Question: 1. #include 2. void dgemm (int n, double* A, double* B, double* C) 3. { 4. for (int i = 0; i < n; i

1. #include 2. void dgemm (int n, double* A, double* B, double* C) 3. { 4. for (int i = 0; i < n; i += 4) 5. for (int j = 0; j < n; j++) { 6. __m256 c0 = _mm256_load_pd(C + i + j * n); /*c0 = C[i][j]*/ 7. for (int k = 0; k < n ; k++) 8. c0 = _mm256_add_pd (c0 , /*c0 += A[i][k] * B[k][j] */ 9. _mm256_mul_pd (_mm256_load_pd(A+i+k*n), 10. _mm256_broadcast_sd(B+k+j*n))); 11. _mm256_store_pd(C+i+j*n, c0); /* C[i][j] = c0 */ 12. } 13. } In line 10, what is the intrinsic function " __m256_broadcast_sd(B+k+j*n)" trying to do?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!