| 119 | |
| 120 | template <typename ElemType> |
| 121 | AxpyPerformanceTest<ElemType>::AxpyPerformanceTest( |
| 122 | BlasFunction fn, |
| 123 | TestParams *params) : PerformanceTest(fn,(problem_size_t) ( (3 * params->N) * sizeof(ElemType) ) ), params_(*params), mobjX_(NULL), mobjY_(NULL) |
| 124 | { |
| 125 | |
| 126 | X_ = blasX_ = Y_ = blasY_ = NULL; |
| 127 | |
| 128 | lengthX = 1 + (params->N - 1) * abs(params_.incx); |
| 129 | lengthY = 1 + (params->N - 1) * abs(params_.incy); |
| 130 | |
| 131 | try |
| 132 | { |
| 133 | X_ = new ElemType[lengthX + params_.offBX]; |
| 134 | blasX_ = new ElemType[lengthX + params_.offBX]; |
| 135 | Y_ = new ElemType[lengthY + params_.offCY]; |
| 136 | blasY_ = new ElemType[lengthY + params_.offCY]; |
| 137 | } |
| 138 | catch(bad_alloc& ba) { |
| 139 | X_ = blasX_ = Y_ = blasY_ = NULL; // areResourcesSufficient() will handle the rest and return |
| 140 | mobjX_= NULL; |
| 141 | ba = ba; |
| 142 | } |
| 143 | |
| 144 | base_ = ::clMath::BlasBase::getInstance(); |
| 145 | } |
| 146 | |
| 147 | template <typename ElemType> |
| 148 | AxpyPerformanceTest<ElemType>::~AxpyPerformanceTest() |
nothing calls this directly
no outgoing calls
no test coverage detected