OpenCLLink`
OpenCLLink`

OpenCLFunction

OpenCLFunction[args]

represents a function loaded using OpenCLFunctionLoad.

更多信息和选项

  • The OpenCLLink application must be loaded using Needs["OpenCLLink`"].
  • OpenCLFunction is returned by OpenCLFunctionLoad.
  • An OpenCLFunction object can be used the same way as a pure function.
  • The function represented by OpenCLFunction runs in the same process as the Wolfram Language kernel.
  • The function represented by OpenCLFunction is unloaded when the Wolfram Language kernel exits.
  • On launch, if the number of threads is not specified (as an extra argument to the OpenCLFunction), 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.

范例

基本范例  (1)

First, load the OpenCLLink application:

This loads a function from OpenCL source:

This calls the function:

This finds information about the function:

Wolfram Research (2010),OpenCLFunction,Wolfram 语言函数,https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLFunction.html.

文本

Wolfram Research (2010),OpenCLFunction,Wolfram 语言函数,https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLFunction.html.

CMS

Wolfram 语言. 2010. "OpenCLFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLFunction.html.

APA

Wolfram 语言. (2010). OpenCLFunction. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLFunction.html 年

BibTeX

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

BibLaTeX

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