From c79696cc61e8db0cfe05245cec4324de67191564 Mon Sep 17 00:00:00 2001 From: Xianyi Zhang Date: Wed, 16 Feb 2011 23:32:13 +0800 Subject: [PATCH] Added rot testcase when incx == incy ==1. --- utest/common_utest.h | 5 +++- utest/main.c | 3 ++ utest/test_rot.c | 67 ++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/utest/common_utest.h b/utest/common_utest.h index 7d43b1811..595364c28 100644 --- a/utest/common_utest.h +++ b/utest/common_utest.h @@ -36,9 +36,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#define CHECK_EPS 0.0002 +#define CHECK_EPS 0.00002 //Testcase list void test_drot_incx_0(void); +void test_srot_incx_0(void); +void test_zdrot_incx_0(void); +void test_csrot_incx_0(void); #endif diff --git a/utest/main.c b/utest/main.c index aac243eb9..87620b591 100644 --- a/utest/main.c +++ b/utest/main.c @@ -38,7 +38,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include CU_TestInfo test_level1[]={ + {"Testing srot when incx & incy == 0",test_srot_incx_0}, {"Testing drot when incx & incy == 0",test_drot_incx_0}, + {"Testing csrot when incx & incy == 0",test_csrot_incx_0}, + {"Testing zdrot when incx & incy == 0",test_zdrot_incx_0}, CU_TEST_INFO_NULL, }; diff --git a/utest/test_rot.c b/utest/test_rot.c index d02a137dd..18a2bbdc6 100644 --- a/utest/test_rot.c +++ b/utest/test_rot.c @@ -43,9 +43,72 @@ void test_drot_incx_0(void) double y2[]={2.0,4.0,6.0,8.0}; //OpenBLAS - drot_(&N,x1,&incX,y1,&incY,&c,&s); + BLASFUNC(drot)(&N,x1,&incX,y1,&incY,&c,&s); //reference - drotf_(&N,x2,&incX,y2,&incY,&c,&s); + BLASFUNC_REF(drot)(&N,x2,&incX,y2,&incY,&c,&s); + + for(i=0; i