I tried to offload a structure with pointers on the MIC. So I tried the code for the example presented in:
However, I get a Segmentation Fault (core dumped) and this occurs when execution hits the
#pragma offload target(mic) in(struct1.m1) in(struct1.m2[0:SIZE] : ALLOC) nocopy(struct1)
When replacing struct1.m2 with a pointer, it works but then we're not using the structure :
int *ptr = struct.m;2
#pragma offload target(mic) in(struct1.m1) in(ptr:length(SIZE) ALLOC) nocopy(struct1)
So does the problem come from the compiler or is there something I'm missing?