CUDAMemoryCopyToHost[mem]
force copies CUDAMemory from the GPU to the CPU.
CUDAMemoryCopyToHost
CUDAMemoryCopyToHost[mem]
force copies CUDAMemory from the GPU to the CPU.
Details and Options
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAMemory is returned by CUDAMemoryLoad or CUDAMemoryAllocate.
Examples
Basic Examples (1)
First, load the CUDALink application:
Needs["CUDALink`"]This loads a Range[10] list into CUDALink:
mem = CUDAMemoryLoad[Range[10]]This gives information about the returned memory. Notice how the "DeviceStatus" is "Uninitialized":
CUDAMemoryInformation[mem]This forces a copy from the host memory (CPU) to the device memory (GPU):
CUDAMemoryCopyToDevice[mem]This gives information about the returned memory. Notice how both "HostStatus" and "DeviceStatus" are "Synchronized":
CUDAMemoryInformation[mem]This will perform an unnecessary copy from the device to the host:
CUDAMemoryCopyToHost[mem]The information is not changed:
CUDAMemoryInformation[mem]Tech Notes
Related Guides
-
▪
- CUDALink
Text
Wolfram Research (2010), CUDAMemoryCopyToHost, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToHost.html.
CMS
Wolfram Language. 2010. "CUDAMemoryCopyToHost." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToHost.html.
APA
Wolfram Language. (2010). CUDAMemoryCopyToHost. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToHost.html
BibTeX
@misc{reference.wolfram_2026_cudamemorycopytohost, author="Wolfram Research", title="{CUDAMemoryCopyToHost}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToHost.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_cudamemorycopytohost, organization={Wolfram Research}, title={CUDAMemoryCopyToHost}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToHost.html}, note=[Accessed: 13-June-2026]}