CUDAMap[f,lst]
applies f to each element on lst.
CUDAMap
CUDAMap[f,lst]
applies f to each element on lst.
更多信息和选项
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAMap works only on general vector types such as "Float", "Double", ….
- CUDAMap does not work on fixed vector structure types like "Float[2]", "Integer32[2]", ….
- CUDAMap does not work on symbolic input.
- CUDAMap is equivalent to Map.
- The value for f can be either Cos, Sin, Tan, ArcCos, ArcSin, ArcTan, Cosh, Sinh, Exp, Log, Log10, Sqrt, Ceiling, Floor, or Abs.
范例
打开所有单元 关闭所有单元基本范例 (2)
First, load the CUDALink application:
Needs["CUDALink`"]This maps the Cos operator on an input list:
CUDAMap[Cos, 1.0 * Range[10]]The above is equivalent to Map:
Map[Cos, 1.0 * Range[10]]The input can be CUDAMemory. This loads a list using CUDAMemoryLoad:
mem = CUDAMemoryLoad[Range[-10, 10], "Byte"]This applies Abs on the input memory:
res = CUDAMap[Abs, mem]The memory returned can be retrieved using CUDAMemoryGet:
CUDAMemoryGet[res]Possible Issues (1)
The output type is the same as the input. If the input is a list of integers, then the decimals are dropped:
CUDAMap[Cos, Range[10]]The above is not equivalent to Map:
Map[Cos, Range[10]]相关指南
-
▪
- CUDALink
文本
Wolfram Research (2010),CUDAMap,Wolfram 语言函数,https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html.
CMS
Wolfram 语言. 2010. "CUDAMap." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html.
APA
Wolfram 语言. (2010). CUDAMap. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html 年
BibTeX
@misc{reference.wolfram_2026_cudamap, author="Wolfram Research", title="{CUDAMap}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html}", note=[Accessed: 16-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_cudamap, organization={Wolfram Research}, title={CUDAMap}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html}, note=[Accessed: 16-August-2026]}