| 116 | |
| 117 | template <typename ElemType> |
| 118 | RotmPerformanceTest<ElemType>::RotmPerformanceTest( |
| 119 | BlasFunction fn, |
| 120 | TestParams *params) : PerformanceTest(fn,(problem_size_t) ((4 * params->N + 5) * sizeof(ElemType))), params_(*params) |
| 121 | { |
| 122 | |
| 123 | X_ = Y_ = PARAM_ = NULL; |
| 124 | back_X_ = back_Y_ = back_PARAM_ = NULL; |
| 125 | mobjX_= mobjY_ = mobjParam_ = NULL; |
| 126 | |
| 127 | lengthx = 1 + (params_.N - 1) * abs(params_.incx); |
| 128 | lengthy = 1 + (params_.N - 1) * abs(params_.incy); |
| 129 | |
| 130 | try |
| 131 | { |
| 132 | X_ = new ElemType[lengthx + params_.offa]; |
| 133 | back_X_ = new ElemType[lengthx + params_.offa]; |
| 134 | Y_ = new ElemType[lengthy + params_.offb]; |
| 135 | back_Y_ = new ElemType[lengthy + params_.offb]; |
| 136 | PARAM_ = new ElemType[5 + params_.offc]; |
| 137 | back_PARAM_ = new ElemType[5 + params_.offc]; |
| 138 | } |
| 139 | catch(bad_alloc& ba) |
| 140 | { |
| 141 | X_ = back_X_ = Y_ = back_Y_ = NULL; // areResourcesSufficient() will handle the rest and return |
| 142 | PARAM_ = back_PARAM_ = NULL; |
| 143 | ba = ba; |
| 144 | } |
| 145 | |
| 146 | base_ = ::clMath::BlasBase::getInstance(); |
| 147 | } |
| 148 | |
| 149 | template <typename ElemType> |
| 150 | RotmPerformanceTest<ElemType>::~RotmPerformanceTest() |
nothing calls this directly
no outgoing calls
no test coverage detected