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

Method runInstance

src/tests/performance/perf-spr2.cpp:65–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 virtual nano_time_t clblasPerfSingle(void);
64
65 static void runInstance(BlasFunction fn, TestParams *params)
66 {
67 Spr2PerformanceTest<ElemType> perfCase(fn, params);
68 int ret = 0;
69 int opFactor;
70 BlasBase *base;
71
72 base = clMath::BlasBase::getInstance();
73
74 opFactor = 1;
75
76 if ((fn == FN_DSPR2) &&
77 !base->isDevSupportDoublePrecision()) {
78
79 std::cerr << ">> WARNING: The target device doesn't support native "
80 "double precision floating point arithmetic" <<
81 std::endl << ">> Test skipped" << std::endl;
82 return;
83 }
84
85 if (!perfCase.areResourcesSufficient(params)) {
86 std::cerr << ">> RESOURCE CHECK: Skip due to unsufficient resources" <<
87 std::endl;
88 }
89 else {
90 ret = perfCase.run(opFactor);
91 }
92
93 ASSERT_GE(ret, 0) << "Fatal error: can not allocate resources or "
94 "perform an OpenCL request!" << endl;
95 EXPECT_EQ(0, ret) << "The OpenCL version is slower in the case" << endl;
96 }
97
98private:
99 Spr2PerformanceTest(BlasFunction fn, TestParams *params);

Callers

nothing calls this directly

Calls 3

runMethod · 0.45

Tested by

no test coverage detected