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