for example, I have
#pragma offload nocopy(a)
{
a = malloc(sizeof(double)*ny*nx);
}And now I want to initialize its first k lines from the data from Host
I can do something like:
inout = malloc(sizeof(double)*k*nx);
memcpy(inout, a, k*nx*sizeof(double));
#pragma offload in(inout: length(k*nx) alloc_if(1) free_if(1)) nocopy(a) in(nx, k)
{
memcpy(a, inout, k * nx * sizeof(double));
}Is there any way to avoid the temporary pointer `inout' ?
Thanks