Skip to content

Commit f81c1d4

Browse files
authored
Fix portability problem
1 parent f7ffab8 commit f81c1d4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

utest/test_extensions/test_zsbmv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static double check_zsbmv(char uplo, blasint n, blasint k, double *alpha, blasin
188188
char trans = 'N';
189189

190190
// Symmetric band packed matrix for sbmv
191-
double a[lda * n * 2];
191+
double *a = (double*) malloc(lda * n * 2 * sizeof(double));
192192

193193
// Fill symmetric packed matrix sp_matrix, vector b_test, vector c_test
194194
drand_generate(data_zsbmv.sp_matrix, n * (n + 1));
@@ -213,6 +213,7 @@ static double check_zsbmv(char uplo, blasint n, blasint k, double *alpha, blasin
213213
BLASFUNC(zsbmv)(&uplo, &n, &k, alpha, a, &lda,
214214
data_zsbmv.b_test, &inc_b, beta, data_zsbmv.c_test, &inc_c);
215215

216+
free(a);
216217
// Find the differences between output vector caculated by zsbmv and zgemv
217218
for (i = 0; i < n * inc_c * 2; i++)
218219
data_zsbmv.c_test[i] -= data_zsbmv.c_verify[i];
@@ -603,4 +604,4 @@ CTEST(zsbmv, xerbla_lda_invalid)
603604
int passed = check_badargs(uplo, n, k, lda, inc_b, inc_c, expected_info);
604605
ASSERT_EQUAL(TRUE, passed);
605606
}
606-
#endif
607+
#endif

0 commit comments

Comments
 (0)