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

Function infoTest

test/info.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void infoTest() {
42 int nDevices = 0;
43 ASSERT_SUCCESS(af_get_device_count(&nDevices));
44 ASSERT_EQ(true, nDevices > 0);
45
46 const char* ENV = getenv("AF_MULTI_GPU_TESTS");
47 if (ENV && ENV[0] == '0') {
48 testFunction<float>();
49 } else {
50 int oldDevice = getDevice();
51 testFunction<float>();
52 for (int d = 0; d < nDevices; d++) {
53 setDevice(d);
54 testFunction<float>();
55 }
56 setDevice(oldDevice);
57 }
58}
59
60TEST(Info, All) { infoTest(); }

Callers 1

TESTFunction · 0.85

Calls 3

getDeviceFunction · 0.85
af_get_device_countFunction · 0.50
setDeviceFunction · 0.50

Tested by

no test coverage detected