Skip to content

Commit

Permalink
Change prefetch size (Apress#106)
Browse files Browse the repository at this point in the history
* Remove UB

Signed-off-by: James Brodman <[email protected]>

* Fix loop bounds

Signed-off-by: James Brodman <[email protected]>

* Change prefetch size

Signed-off-by: James Brodman <[email protected]>

---------

Signed-off-by: James Brodman <[email protected]>
  • Loading branch information
jbrodman authored Jun 5, 2023
1 parent c409529 commit d7f7961
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main() {
if ((b + 1) < NUM_BLOCKS) {
// Prefetch next block
e = q.prefetch(data + (b + 1) * BLOCK_SIZE,
BLOCK_SIZE);
BLOCK_SIZE*sizeof(int));
}
}
q.wait();
Expand Down

0 comments on commit d7f7961

Please sign in to comment.