force copies CUDAMemory from the GPU to the CPU.
更多信息和选项更多信息The CUDALink application must be loaded using Needs["CUDALink`"].CUDAMemory is returned by CUDAMemoryLoad or CUDAMemoryAllocate.
First, load the CUDALink application:
This loads a Range list into CUDALink:
This gives information about the returned memory. Notice how the "DeviceStatus" is "Uninitialized":
This forces a copy from the host memory (CPU) to the device memory (GPU):
This gives information about the returned memory. Notice how both "HostStatus" and "DeviceStatus" are "Synchronized":
This will perform an unnecessary copy from the device to the host:
The information is not changed: