| 33 | } |
| 34 | |
| 35 | int main(int, char**) { |
| 36 | std::generate(input.begin(), input.end(), unifRand); |
| 37 | |
| 38 | try { |
| 39 | printf("Trying CPU Backend\n"); |
| 40 | af::setBackend(AF_BACKEND_CPU); |
| 41 | testBackend(); |
| 42 | } catch (af::exception& e) { |
| 43 | printf("Caught exception when trying CPU backend\n"); |
| 44 | fprintf(stderr, "%s\n", e.what()); |
| 45 | } |
| 46 | |
| 47 | try { |
| 48 | printf("Trying CUDA Backend\n"); |
| 49 | af::setBackend(AF_BACKEND_CUDA); |
| 50 | testBackend(); |
| 51 | } catch (af::exception& e) { |
| 52 | printf("Caught exception when trying CUDA backend\n"); |
| 53 | fprintf(stderr, "%s\n", e.what()); |
| 54 | } |
| 55 | |
| 56 | try { |
| 57 | printf("Trying OpenCL Backend\n"); |
| 58 | af::setBackend(AF_BACKEND_OPENCL); |
| 59 | testBackend(); |
| 60 | } catch (af::exception& e) { |
| 61 | printf("Caught exception when trying OpenCL backend\n"); |
| 62 | fprintf(stderr, "%s\n", e.what()); |
| 63 | } |
| 64 | |
| 65 | return 0; |
| 66 | } |
nothing calls this directly
no test coverage detected