Actions
Bug #3582
openDefect ID: DF003
Bug #3582:
Defect ID: DF003
Start date:
10/02/2025
Due date:
% Done:
0%
Estimated time:
Description
Defect ID: DF003
Defect Name: Dot-product Overwritten Instead of Accumulated
Line Number: 12
Defect Description: Inside the inner loop that computes the dot product, C[i][j] is assigned the product for each k (e.g., C[i][j] = A[i][k] * B[k][j];), which overwrites previous partial sums and yields incorrect results.
Fixing Solution: Accumulate the sum into a local variable (e.g., int sum = 0; then sum += A[i][k] * B[k][j];) and assign C[i][j] = sum; after the k-loop.
No data to display
Actions