Changeset 5698 in /cluster/svnroot


Ignore:
Timestamp:
May 23, 2016 7:56:29 PM (5 years ago)
Author:
skylar
Message:

better commenting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/bw-institute/2016/day06/matmul/matmul.c

    r5697 r5698  
    105105#pragma omp parallel for private(dst_coord,i) collapse(2) schedule(static,1)
    106106#endif
     107    // Process each cell in the destination matrix, and calculate the result
     108    // based on the two source matrices
    107109    for(dst_row=0;dst_row<dst_m->rows;dst_row++) {
    108110        for(dst_col=0;dst_col<dst_m->cols;dst_col++) {
     
    113115            // Make sure destination matrix is initialized
    114116            dst_m->matrix[dst_coord] = 0;
     117            // The number of rows in m1 is guaranteed to be the number
     118            // of columns in m2, so when we are done processing m1's rows
     119            // we are also done processing m2's columns
     120            // This part is not as amenable to parallelization since the
     121            // multiple threads would have to update the cell in the
     122            // product matrix at the same time
    115123            for(i=0;i<m1->rows;i++) {
    116124                dst_m->matrix[dst_coord] +=
Note: See TracChangeset for help on using the changeset viewer.