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

Method Nrm2PerformanceTest

src/tests/performance/perf-nrm2.cpp:106–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected