Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Validation/Performance/bin/FFT.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void FFT_transform_internal(int N, double *data, int direction) {
double t = sin(theta / 2.0);
double s2 = 2.0 * t * t;

for (a = 0, b = 0; b < n; b += 2 * dual) {
for (b = 0; b < n; b += 2 * dual) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a is not used in this loop

int i = 2 * b;
int j = 2 * (b + dual);

Expand Down
2 changes: 1 addition & 1 deletion Validation/Performance/bin/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ double **new_Array2D_double(int M, int N) {

if (failed) {
i--;
for (; i <= 0; i--)
for (; i >= 0; i--)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind of infinite loop for i=-1 e.g. when https://github.com/cms-sw/cmssw/blob/master/Validation/Performance/bin/array.c#L17-L23 failed for first item i=0.

Copy link
Contributor Author

@smuzaffar smuzaffar Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and i think it was memory leak for i>0

free(A[i]);
free(A);
return NULL;
Expand Down