//#define _BSD_SOURCE #pragma offload_attribute(push,target(mic)) #include #pragma offload_attribute(pop) #include #include #include #include #include #define Nwords (2*4096) struct ctx { int *data; int tid; int ntid; int sleep_us; }; static void *offload_thread(void *data) { struct ctx *c = (struct ctx *)data; int tid = c->tid; int ntid = c->ntid; int *mybit = c->data; int Nsleep_us = c->sleep_us; long a = 0; while (a != 7) { _Pragma("offload target(mic:0) in ( mybit : length(0) alloc_if(0) free_if(0))") { a = 0; for (int j=0; j