Skip to content

Commit

Permalink
make independent of CBLAS
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Apr 5, 2024
1 parent bebe5e5 commit ec8e945
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions utest/test_zscal.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CTEST(zscal, i_nan)
{
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
cblas_zscal(9, i, &nan, 1);
BLASFUNC(zscal)(9, i, &nan, 1);
ASSERT_TRUE(isnan(nan[0]));
ASSERT_TRUE(isnan(nan[1]));
ASSERT_TRUE(isnan(nan[16]));
Expand All @@ -25,7 +25,7 @@ CTEST(zscal, i_nan_inc_2)
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0,
NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
cblas_zscal(9, i, &nan, 2);
BLASFUNC(zscal)(9, i, &nan, 2);
ASSERT_TRUE(isnan(nan[0]));
ASSERT_TRUE(isnan(nan[1]));
ASSERT_TRUE(isnan(nan[16]));
Expand All @@ -36,7 +36,7 @@ CTEST(zscal, nan_i)
{
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
cblas_zscal(9, &nan, &i, 1);
BLASFUNC(zscal)(9, &nan, &i, 1);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isnan(i[1]));
ASSERT_TRUE(isnan(i[16]));
Expand All @@ -48,7 +48,7 @@ CTEST(zscal, nan_i_inc_2)
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1,
0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
cblas_zscal(9, &nan, &i, 2);
BLASFUNC(zscal)(9, &nan, &i, 2);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isnan(i[1]));
ASSERT_TRUE(isnan(i[16]));
Expand All @@ -59,7 +59,7 @@ CTEST(zscal, i_inf)
{
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
cblas_zscal(9, i, &inf, 1);
BLASFUNC(zscal)(9, i, &inf, 1);
ASSERT_TRUE(isnan(inf[0]));
ASSERT_TRUE(isinf(inf[1]));
ASSERT_TRUE(isnan(inf[16]));
Expand All @@ -71,7 +71,7 @@ CTEST(zscal, i_inf_inc_2)
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0,
INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
cblas_zscal(9, i, &inf, 2);
BLASFUNC(zscal)(9, i, &inf, 2);
ASSERT_TRUE(isnan(inf[0]));
ASSERT_TRUE(isinf(inf[1]));
ASSERT_TRUE(isnan(inf[16]));
Expand All @@ -82,7 +82,7 @@ CTEST(zscal, inf_i)
{
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
cblas_zscal(9, &inf, &i, 1);
BLASFUNC(zscal)(9, &inf, &i, 1);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isinf(i[1]));
ASSERT_TRUE(isnan(i[16]));
Expand All @@ -94,7 +94,7 @@ CTEST(zscal, inf_i_inc_2)
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1,
0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
cblas_zscal(9, &inf, &i, 2);
BLASFUNC(zscal)(9, &inf, &i, 2);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isinf(i[1]));
ASSERT_TRUE(isnan(i[16]));
Expand Down

0 comments on commit ec8e945

Please sign in to comment.