| 39 | } |
| 40 | |
| 41 | void 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 | |
| 60 | TEST(Info, All) { infoTest(); } |
no test coverage detected