CUDAMemoryCopyToDevice[mem]
force copies CUDAMemory from the CPU to the GPU.
CUDAMemoryCopyToDevice
CUDAMemoryCopyToDevice[mem]
force copies CUDAMemory from the CPU to the GPU.
更多信息和选项
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAMemory is returned by CUDAMemoryLoad or CUDAMemoryAllocate.
范例
基本范例 (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]相关指南
-
▪
- CUDALink
文本
Wolfram Research (2010),CUDAMemoryCopyToDevice,Wolfram 语言函数,https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToDevice.html.
CMS
Wolfram 语言. 2010. "CUDAMemoryCopyToDevice." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToDevice.html.
APA
Wolfram 语言. (2010). CUDAMemoryCopyToDevice. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToDevice.html 年
BibTeX
@misc{reference.wolfram_2026_cudamemorycopytodevice, author="Wolfram Research", title="{CUDAMemoryCopyToDevice}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToDevice.html}", note=[Accessed: 12-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_cudamemorycopytodevice, organization={Wolfram Research}, title={CUDAMemoryCopyToDevice}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAMemoryCopyToDevice.html}, note=[Accessed: 12-September-2026]}