Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMult_4x4_13.c incorrect if clause #26

Open
horgerares opened this issue Sep 21, 2024 · 0 comments
Open

MMult_4x4_13.c incorrect if clause #26

horgerares opened this issue Sep 21, 2024 · 0 comments

Comments

@horgerares
Copy link

horgerares commented Sep 21, 2024

In MMult_4x4_13.c

for ( j=0; j<n; j+=4 ){        /* Loop over the columns of C, unrolled by 4 */
    for ( i=0; i<m; i+=4 ){        /* Loop over the rows of C */
      /* Update C( i,j ), C( i,j+1 ), C( i,j+2 ), and C( i,j+3 ) in
	 one routine (four inner products) */
      if ( j == 0 ) PackMatrixA( k, &A( i, 0 ), lda, &packedA[ i*k ] );
      AddDot4x4( k, &packedA[ i*k ], 4, &B( 0,j ), ldb, &C( i,j ), ldc );
    }
  }

I don't think this if ( j == 0 ) clause is correct, because the PackMatrixA function receives the i variable as an argument.
If this line is correct, could someone explain me why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant