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

Method AxpyPerformanceTest

src/tests/performance/perf-axpy.cpp:121–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120template <typename ElemType>
121AxpyPerformanceTest<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
147template <typename ElemType>
148AxpyPerformanceTest<ElemType>::~AxpyPerformanceTest()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected