Skip to content

Commit

Permalink
Changes to blockSize1.c to better handle alignment issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurmasz committed Nov 5, 2021
1 parent 5250d7b commit 60f06e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockSize1.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define ARRAY_SIZE 16*1024 /* i.e., 8KB */
#define NUM_LOOPS 100
#define NUM_LOOPS 100000


/****************************************************************************
Expand All @@ -17,11 +17,11 @@

int main()
{
_Alignas(64) /* make sure that the array aligns with the cache. */
char array[ARRAY_SIZE];
register int outer_loop;
register int inner_loop;
register int solution = 0;
/* char* array = array_d + 8; */

for (outer_loop = 0; outer_loop < NUM_LOOPS; outer_loop++)
{
Expand Down

0 comments on commit 60f06e3

Please sign in to comment.