cudaMemcpy Allow for offset

cudaMemcpy copies count bytes from the memory area pointed to by src to the memory area pointed to by dst

Add parameters for offsets, so memory copy does not have to be from position 0 in src and copy to dst does not have to be into memory from position 0

So when copying from host to device, host array may be larger than device array

And copying device to host, host array may be larger than device array and only updated from offset position

Saves me having to setup small temporary array for part I want copied to device and will save processing time.

Hi, unless I’m mistaken,

you can actually index into the array by using the address of array subitems:

cudaMemcpy(&deviceArray[someOffset], &hostArray[someCrazyOffset], subsetSize * sizeof(datatype), cudaMemcpyHostToDevice);

You are correct. Thank-you for assisting me, it is greatly appreciated.