| 37 | |
| 38 | #ifndef HER_PACKED |
| 39 | class HER : public TestWithParam< |
| 40 | #else |
| 41 | class HPR : public TestWithParam< |
| 42 | #endif |
| 43 | |
| 44 | ::std::tr1::tuple< |
| 45 | clblasOrder, // order |
| 46 | clblasUplo, // uplo |
| 47 | int, // N |
| 48 | double, //alpha |
| 49 | int, // lda |
| 50 | int, //incx |
| 51 | int, // offx |
| 52 | int, // offa //FIX_ME.. gtest not allowing to add more parameters |
| 53 | int // numCommandQueues |
| 54 | > > { |
| 55 | public: |
| 56 | void getParams(TestParams *params) |
| 57 | { |
| 58 | params->order = order; |
| 59 | params->uplo = uplo; |
| 60 | params->N = N; |
| 61 | params->alpha.re = (long)alpha; |
| 62 | params->lda = lda; |
| 63 | params->incx = incx; |
| 64 | params->offa = offa; |
| 65 | params->offBX = offx; |
| 66 | params->numCommandQueues = numCommandQueues; |
| 67 | } |
| 68 | |
| 69 | protected: |
| 70 | virtual void SetUp() |
| 71 | { |
| 72 | order = ::std::tr1::get<0>(GetParam()); |
| 73 | uplo = ::std::tr1::get<1>(GetParam()); |
| 74 | N = ::std::tr1::get<2>(GetParam()); |
| 75 | alpha = ::std::tr1::get<3>(GetParam()); |
| 76 | lda = ::std::tr1::get<4>(GetParam()); |
| 77 | incx = ::std::tr1::get<5>(GetParam()); |
| 78 | offa = ::std::tr1::get<6>(GetParam()); |
| 79 | offx = ::std::tr1::get<7>(GetParam()); |
| 80 | numCommandQueues = ::std::tr1::get<8>(GetParam()); |
| 81 | |
| 82 | #ifndef HER_PACKED |
| 83 | lda = ::std::max( lda, N ); |
| 84 | #else |
| 85 | lda =0; |
| 86 | #endif |
| 87 | |
| 88 | base = ::clMath::BlasBase::getInstance(); |
| 89 | seed = base->seed(); |
| 90 | |
| 91 | useNumCommandQueues = base->useNumCommandQueues(); |
| 92 | if (useNumCommandQueues) { |
| 93 | numCommandQueues = base->numCommandQueues(); |
| 94 | } |
| 95 | |
| 96 | if (base->useN()) { |