#include <cstdio>
#include <vector>
#include <algorithm>
std::vector<float> input(100);
double unifRand()
{
return rand() / double(RAND_MAX);
}
void testBackend()
{
}
int main(int argc, char *argv[])
{
std::generate(input.begin(), input.end(), unifRand);
try {
printf("Trying CPU Backend\n");
testBackend();
printf("Caught exception when trying CPU backend\n");
fprintf(stderr,
"%s\n", e.
what());
}
try {
printf("Trying CUDA Backend\n");
testBackend();
printf("Caught exception when trying CUDA backend\n");
fprintf(stderr,
"%s\n", e.
what());
}
try {
printf("Trying OpenCL Backend\n");
testBackend();
printf("Caught exception when trying OpenCL backend\n");
fprintf(stderr,
"%s\n", e.
what());
}
return 0;
}