CUDALink`
CUDALink`

CUDAFunction

CUDAFunction[args]

represents a function loaded using CUDAFunctionLoad.

Details and Options

  • The CUDALink application must be loaded using Needs["CUDALink`"].
  • CUDAFunction is returned by CUDAFunctionLoad.
  • A CUDAFunction object can be used the same way as a pure function.
  • The function represented by CUDAFunction runs in the same process as the Wolfram Language kernel.
  • The function represented by CUDAFunction is unloaded when the Wolfram Language kernel exits.
  • CUDAFunctionInformation returns information about the CUDAFunction.
  • On launch, if the number of threads is not specified (as an extra argument to the CUDAFunction), then the dimension of the element with largest rank and dimension is chosen. For images, the rank is set to 2.
  • On launch, if the number of threads is not a multiple of the block dimension, then it is incremented to be a multiple of the block dimension.

Examples

Basic Examples  (1)

First, load the CUDALink application:

This loads a function from the CUDA source:

This calls the function:

This gives information about the CUDA function:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_cudafunction, author="Wolfram Research", title="{CUDAFunction}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAFunction.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_cudafunction, organization={Wolfram Research}, title={CUDAFunction}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAFunction.html}, note=[Accessed: 18-November-2024 ]}