| 56 | } |
| 57 | |
| 58 | void 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 | |
| 83 | TEST(BACKEND_TEST, Basic) { backendTest(); } |
| 84 |
no test coverage detected