Skip to content

Commit b45a78c

Browse files
authored
fix zdotu argument passing in utest_ext on windows (#4691)
* fix passing of results on windows
1 parent 1ab9f50 commit b45a78c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

utest/test_extensions/test_cgemv_t.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ static void matrix_vector_product(blasint n, blasint m, blasint lda, blasint inc
7474

7575
for (i = 0; i < n * inc_x; i+= inc_x)
7676
{
77+
#ifdef RETURN_BY_STACK
78+
BLASFUNC(cdotu)(&result, &lda, a_ptr, &one, x_ptr, &inc_x);
79+
#else
7780
result = BLASFUNC(cdotu)(&lda, a_ptr, &one, x_ptr, &inc_x);
81+
#endif
7882
x_res[0] = CREAL(result);
7983
x_res[1] = CIMAG(result);
8084
a_ptr += lda * 2;

utest/test_extensions/test_zgemv_t.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ static void matrix_vector_product(blasint n, blasint m, blasint lda, blasint inc
7474

7575
for (i = 0; i < n * inc_x; i += inc_x)
7676
{
77-
result = BLASFUNC(zdotu)(&lda, a_ptr, &one, x_ptr, &inc_x);
78-
x_res[0] = CREAL(result);
77+
#ifdef RETURN_BY_STACK
78+
BLASFUNC(zdotu)(&result, &lda, a_ptr, &one, x_ptr, &inc_x);
79+
#else
80+
result = BLASFUNC(zdotu)(&lda, a_ptr, &one, x_ptr, &inc_x);
81+
#endif
82+
x_res[0] = CREAL(result);
7983
x_res[1] = CIMAG(result);
8084
a_ptr += lda * 2;
8185
x_res += 2 * inc_x;

0 commit comments

Comments
 (0)