Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add tests for IAMAX with NaN values
  • Loading branch information
martin-frbg authored Aug 14, 2023
commit 3e87ac9a49b209ec168b52d1fcad3d815cdd0c99
26 changes: 26 additions & 0 deletions utest/test_amax.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,29 @@ CTEST(amax, damax){
}
#endif

#ifdef BUILD_SINGLE
CTEST(amax, isamax_nan){
blasint N=3, inc=1;
int te_max=0, tr_max=2;
float x[]={1., 0./0., 0./0. };
//float x[]={ 0./0., 2., 3. };


te_max=BLASFUNC(isamax)(&N, x, &inc);

ASSERT_EQUAL(tr_max, te_max);
}
#endif

#ifdef BUILD_DOUBLE
CTEST(amax, idamax_nan){
blasint N=4, inc=1;
int te_max=0, tr_max=1;
//float x[]={1., 0./0., 0./0. };
double x[]={ 0./0., 1.,2. ,3.};

te_max=BLASFUNC(idamax)(&N, x, &inc);

ASSERT_EQUAL(tr_max, te_max);
}
#endif