-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src,test: fix some bugs around ivar recovery and pos splits
This commit fixes several bugs around the recovery of index variables when splits/divides of the position spaces are involved. In particular, the old code would emit position loops like ``` for (int jposo = A2_pos[i] / chunkSize; jposo < (A2_pos[i+1] + (chunkSize - 1)) / chunkSize; jposo++) { for (int jposi = 0; jposi < chunkSize; jposi++) { int jposA = jposo * chunkSize + jposi; ... } } ``` This does not correctly iterate over the position space. A correct code is: ``` for (int jposo = 0; jposo < ((A2_pos[i+1] - A2_pos[i]) + (chunkSize - 1)) / chunkSize; jposo++) { for (int jposi = 0; jposi < chunkSize; jposi++) { int jposA = jposo * chunkSize + jposi + A2_pos[i]; ... } } ```
- Loading branch information
Showing
3 changed files
with
78 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters