Advertisement
What_Ever

Untitled

Oct 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. int i = 0;
  13.     for (int row = 0 ; row < first_rows ; row++) {
  14.         mat_a[row] = (int *) malloc(shared_dim * sizeof(int));
  15.         for (int col = 0 ; col < shared_dim ; col++) {
  16.             mat_a[row][col] = ++i;
  17.         }
  18.     }
  19.     for (int row = 0 ; row < shared_dim ; row++) {
  20.         mat_b[row] = (int *) malloc(second_cols * sizeof(int));
  21.         for (int col = 0 ; col < second_cols ; col++) {
  22.             mat_b[row][col] = ++i;
  23.         }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement