MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / CopyPerformanceTest

Method CopyPerformanceTest

src/tests/performance/perf-copy.cpp:108–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107template <typename ElemType>
108CopyPerformanceTest<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
134template <typename ElemType>
135CopyPerformanceTest<ElemType>::~CopyPerformanceTest()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected