cudaMemcpy into part of an array?

I was wondering if it’s possible to do something like the following:

STATUS = cudaMemcpy(ArgVar2d(:,:,3),QSS,IM*JM* LM   )

where QSS, say, is shape (IM,JM,LM) and ArgVar2d is a device array of shape(IM*JM,LM,5).

I often reshape arrays via the cudaMemcpy interface when one is IM,JM,LM and the other is IM*JM,LM, but I’ve never tried to “insert” into the device array like this.

Matt

Answering my own question (with guidance from more knowledgeable people than I), the thing to do is think like the old days of F77:

STATUS = cudaMemcpy(ArgVar2d(1,1,3),QSS,IM*JM* LM   )

Assumed-size-like or C-like in thinking seems to work.