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