Update test_dotu.c

This commit is contained in:
Martin Kroeker 2018-02-18 22:07:56 +01:00 committed by GitHub
parent 9e543b2076
commit 416c324fae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 23 deletions

View File

@ -39,13 +39,12 @@ CTEST( zdotu,zdotu_n_1)
blasint N=1,incX=1,incY=1;
double x1[]={1.0,1.0};
double y1[]={1.0,2.0};
#ifdef __CTEST_MSVC
openblas_complex_double result1=openblas_make_complex_double(0.0,0.0);
openblas_complex_double result2=openblas_make_complex_double(-1.0000,3.0000);
result1=BLASFUNC(zdotu)(&N,x1,&incX,y1,&incY);
#ifdef RETURN_BY_STACK
BLASFUNC(zdotu)(&result1,&N,x1,&incX,y1,&incY);
#else
_Complex double result1=openblas_make_complex_double(0.0,0.0);
_Complex double result2=openblas_make_complex_double(-1.0000,3.0000);
result1=BLASFUNC(zdotu)(&N,x1,&incX,y1,&incY);
#endif
@ -56,8 +55,6 @@ CTEST( zdotu,zdotu_n_1)
ASSERT_DBL_NEAR_TOL(creal(result1), creal(result2), DOUBLE_EPS);
ASSERT_DBL_NEAR_TOL(cimag(result1), cimag(result2), DOUBLE_EPS);
#endif
// printf("\%lf,%lf\n",creal(result1),cimag(result1));
}
CTEST(zdotu, zdotu_offset_1)
@ -65,13 +62,12 @@ CTEST(zdotu, zdotu_offset_1)
blasint N=1,incX=1,incY=1;
double x1[]={1.0,2.0,3.0,4.0};
double y1[]={5.0,6.0,7.0,8.0};
#ifdef __CTEST_MSVC
_Dcomplex result1=openblas_make_complex_double(0.0,0.0);
_Dcomplex result2=openblas_make_complex_double(-9.0000,32.0000);
result1=BLASFUNC(zdotu)(&N,x1+1,&incX,y1+1,&incY);
openblas_complex_double result1=openblas_make_complex_double(0.0,0.0);
openblas_complex_double result2=openblas_make_complex_double(-9.0,32.0);
#ifdef RETURN_BY_STACK
BLASFUNC(zdotu)(&result1,&N,x1+1,&incX,y1+1,&incY);
#else
_Complex double result1=openblas_make_complex_double(0.0,0.0);
_Complex double result2=openblas_make_complex_double(-9.0000,32.0000);
result1=BLASFUNC(zdotu)(&N,x1+1,&incX,y1+1,&incY);
#endif
@ -82,7 +78,4 @@ CTEST(zdotu, zdotu_offset_1)
ASSERT_DBL_NEAR_TOL(creal(result1), creal(result2), DOUBLE_EPS);
ASSERT_DBL_NEAR_TOL(cimag(result1), cimag(result2), DOUBLE_EPS);
#endif
// printf("\%lf,%lf\n",creal(result1),cimag(result1));
}