Browse Source

Merge pull request #5057 from martin-frbg/issue5050

Replace while loop in generic C/ZGEMM_BETA to avoid going out of bounds
tags/v0.3.29
Martin Kroeker GitHub 1 year ago
parent
commit
d74eb02954
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      kernel/generic/zgemm_beta.c

+ 6
- 8
kernel/generic/zgemm_beta.c View File

@@ -58,8 +58,8 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1,
c_offset = c;

if (beta_r == 0. && beta_i == 0.) {
j = n;
do {
for (j=n;j>0;j--) {
c_offset1 = c_offset;
c_offset += ldc;

@@ -88,13 +88,12 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1,
i--;
} while (i > 0);
}
j --;
} while (j > 0);
}

} else {

j = n;
do {
for (j=n;j>0;j--) {
c_offset1 = c_offset;
c_offset += ldc;

@@ -151,8 +150,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1,
i --;
} while (i > 0);
}
j --;
} while (j > 0);
}
}
return 0;
}

Loading…
Cancel
Save