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

Method runInstance

src/tests/performance/perf-spr.cpp:63–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

runMethod · 0.45

Tested by

no test coverage detected