Advertisement
polectron

Untitled

Dec 11th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #define NROWS 8192 // 2^13 rows
  2. #define NCOLS 8192 // 2^13 cols
  3. #define NTIMES 10 // Repeat 10 times
  4.  
  5. // Matrix size 2^26 = 64 MiBytes
  6. char matrix[NROWS][NCOLS];
  7.  
  8. int main(void)
  9. {
  10. int i, j, rep;
  11.  
  12. // Repeat NTIMES to obtain e better execution time
  13. for (rep = 0; rep < NTIMES; rep++)
  14. {
  15. for (i = 0; i < NROWS; i++)
  16. {
  17. for(j = 0; j < NCOLS; j++)
  18. {
  19. matrix[i][j] = 'A';
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement