MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / backendTest

Function backendTest

test/backend.cpp:58–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void backendTest() {
59 int backends = getAvailableBackends();
60
61 ASSERT_NE(backends, 0);
62
63 bool cpu = backends & AF_BACKEND_CPU;
64 bool cuda = backends & AF_BACKEND_CUDA;
65 bool opencl = backends & AF_BACKEND_OPENCL;
66
67 if (cpu) {
68 setBackend(AF_BACKEND_CPU);
69 testFunction(AF_BACKEND_CPU);
70 }
71
72 if (cuda) {
73 setBackend(AF_BACKEND_CUDA);
74 testFunction(AF_BACKEND_CUDA);
75 }
76
77 if (opencl) {
78 setBackend(AF_BACKEND_OPENCL);
79 testFunction(AF_BACKEND_OPENCL);
80 }
81}
82
83TEST(BACKEND_TEST, Basic) { backendTest(); }
84

Callers 1

TESTFunction · 0.85

Calls 3

getAvailableBackendsFunction · 0.85
testFunctionFunction · 0.70
setBackendFunction · 0.50

Tested by

no test coverage detected