OpenCLMemoryCopyToDevice[mem]
force copies OpenCLMemory from the CPU to the GPU.
OpenCLMemoryCopyToDevice
OpenCLMemoryCopyToDevice[mem]
force copies OpenCLMemory from the CPU to the GPU.
更多信息和选项
- The OpenCLLink application must be loaded using Needs["OpenCLLink`"].
- OpenCLMemory is returned by OpenCLMemoryLoad or OpenCLMemoryAllocate.
范例
基本范例 (1)
First, load the OpenCLLink application:
This loads the Range[10] list into OpenCLLink:
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":
相关指南
相关链接
文本
Wolfram Research (2010),OpenCLMemoryCopyToDevice,Wolfram 语言函数,https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMemoryCopyToDevice.html.
CMS
Wolfram 语言. 2010. "OpenCLMemoryCopyToDevice." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMemoryCopyToDevice.html.
APA
Wolfram 语言. (2010). OpenCLMemoryCopyToDevice. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMemoryCopyToDevice.html 年
BibTeX
@misc{reference.wolfram_2025_openclmemorycopytodevice, author="Wolfram Research", title="{OpenCLMemoryCopyToDevice}", year="2010", howpublished="\url{https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMemoryCopyToDevice.html}", note=[Accessed: 01-May-2026]}
BibLaTeX
@online{reference.wolfram_2025_openclmemorycopytodevice, organization={Wolfram Research}, title={OpenCLMemoryCopyToDevice}, year={2010}, url={https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMemoryCopyToDevice.html}, note=[Accessed: 01-May-2026]}