#include <veda.h>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#define CHECK(err) check(err, __FILE__, __LINE__)
void check(VEDAresult err, const char* file, const int line) {
if(err != VEDA_SUCCESS) {
const char* name = 0;
printf("Error: %i %s @ %s (%i)\n", err, name, file, line);
assert(false);
exit(1);
}
}
int main(int argc, char** argv) {
int devcnt;
for(int dev = 0; dev < devcnt; dev++) {
VEDAcontext ctx;
int cnt, cores;
if(cnt == cores)
{
printf("Passed\n");
}
printf("For device %d: Stream count is %d and avaliable device core is %d\n",dev, cnt, cores);
}
setenv("VE_OMP_NUM_THREADS","1", 1);
for(int dev = 0; dev < devcnt; dev++) {
VEDAcontext ctx;
int cnt;
if(cnt == 1)
{
printf("Passed\n");
}
printf("For device %d: Stream count is %d which should be same as VE_OMP_NUM_THREADS env variable i.e. 1\n",dev,cnt);
}
return 0;
}