BLASFUNC(daxpy)(&N,&a,x1,&incX,y1,&incY);
for(i=0; i<N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(zaxpy)(&N,a,x1,&incX,y1,&incY);
for(i=0; i<2*N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(saxpy)(&N,&a,x1,&incX,y1,&incY);
for(i=0; i<N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(caxpy)(&N,a,x1,&incX,y1,&incY);
for(i=0; i<2*N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
#include "openblas_utest.h"
#include <complex.h>
-#include <stdio.h>
CTEST( zdotu,zdotu_n_1)
{
#endif
#ifdef OPENBLAS_COMPLEX_STRUCT
- ASSERT_DBL_NEAR_TOL(result1.real, result2.real, DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(result1.imag, result2.imag, DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(result2.real, result1.real, DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(result2.imag, result1.imag, DOUBLE_EPS);
#else
- ASSERT_DBL_NEAR_TOL(creal(result1), creal(result2), DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(cimag(result1), cimag(result2), DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(creal(result2), creal(result1), DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(cimag(result2), cimag(result1), DOUBLE_EPS);
#endif
}
#endif
#ifdef OPENBLAS_COMPLEX_STRUCT
- ASSERT_DBL_NEAR_TOL(result1.real, result2.real, DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(result1.imag, result2.imag, DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(result2.real, result1.real, DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(result2.imag, result1.imag, DOUBLE_EPS);
#else
- ASSERT_DBL_NEAR_TOL(creal(result1), creal(result2), DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(cimag(result1), cimag(result2), DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(creal(result2), creal(result1), DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(cimag(result2), cimag(result1), DOUBLE_EPS);
#endif
}
double res1=0.0f, res2=-0.00239335360107;
res1=BLASFUNC(dsdot)(&n, &x, &incx, &y, &incy);
- ASSERT_DBL_NEAR_TOL(res1, res2, DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
}
BLASFUNC(drot)(&N,x1,&incX,y1,&incY,&c,&s);
for(i=0; i<N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(zdrot)(&N,x1,&incX,y1,&incY,&c,&s);
for(i=0; i<2*N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(srot)(&N,x1,&incX,y1,&incY,&c,&s);
for(i=0; i<N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], SINGLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
}
}
BLASFUNC(csrot)(&N,x1,&incX,y1,&incY,&c,&s);
for(i=0; i<2*N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], SINGLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
}
}
BLASFUNC(dswap)(&N,x1,&incX,y1,&incY);
for(i=0; i<N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(zswap)(&N,x1,&incX,y1,&incY);
for(i=0; i<2*N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], DOUBLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], DOUBLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], DOUBLE_EPS);
}
}
BLASFUNC(sswap)(&N,x1,&incX,y1,&incY);
for(i=0; i<N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], SINGLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
}
}
BLASFUNC(cswap)(&N,x1,&incX,y1,&incY);
for(i=0; i<2*N; i++){
- ASSERT_DBL_NEAR_TOL(x1[i], x2[i], SINGLE_EPS);
- ASSERT_DBL_NEAR_TOL(y1[i], y2[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(x2[i], x1[i], SINGLE_EPS);
+ ASSERT_DBL_NEAR_TOL(y2[i], y1[i], SINGLE_EPS);
}
}