CUDALink`
CUDALink`

CUDAMap

CUDAMap[f,lst]

applies f to each element on lst.

Details and Options

  • 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.

Examples

open allclose all

Basic Examples  (2)

First, load the CUDALink application:

This maps the Cos operator on an input list:

The above is equivalent to Map:

The input can be CUDAMemory. This loads a list using CUDAMemoryLoad:

This applies Abs on the input memory:

The memory returned can be retrieved using CUDAMemoryGet:

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:

The above is not equivalent to Map:

Wolfram Research (2010), CUDAMap, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html.

Text

Wolfram Research (2010), CUDAMap, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html.

CMS

Wolfram Language. 2010. "CUDAMap." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html.

APA

Wolfram Language. (2010). CUDAMap. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html

BibTeX

@misc{reference.wolfram_2022_cudamap, author="Wolfram Research", title="{CUDAMap}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html}", note=[Accessed: 05-July-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_cudamap, organization={Wolfram Research}, title={CUDAMap}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAMap.html}, note=[Accessed: 05-July-2022 ]}