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

Method DotcPerformanceTest

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected