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

Method runInstance

src/tests/performance/perf-symv.cpp:68–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

runMethod · 0.45

Tested by

no test coverage detected