Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how

Legacy Documentation

Mathematica 8 (2010)

This is documentation for Mathematica 8, which was
based on an earlier version of Wolfram Language.
View current documentation (Version 14.3)

Reference

OpenCLLink allows Mathematica to use the OpenCL parallel computing language. It contains functions that facilitate loading user-defined OpenCL functions into Mathematica. OpenCLLink also integrates OpenCL with existing Mathematica development tools, allowing a high degree of automation and control.

Query

OpenCLQ determine whether OpenCLLink is supported
OpenCLInformation enumerate all device information
$OpenCLLinkPath path to the OpenCLLink application
$OpenCLLinkLibraryPath path to the OpenCLLink library resource files
$OpenCLPlatform platform used in OpenCLLink computation
$OpenCLDevice device used in OpenCLLink computation

Functions for querying the setup of OpenCLLink.

Programming

OpenCLFunction handle to OpenCL function loaded using OpenCLFunctionLoad
OpenCLFunctionLoad load OpenCLFunction into Mathematica

Working with OpenCL functions.

SymbolicOpenCLFunction symbolic representation of an OpenCL function
SymbolicOpenCLBlockIndex symbolic representation of a block index OpenCL call
SymbolicOpenCLThreadIndex symbolic representation of a thread index OpenCL call
SymbolicOpenCLBlockDimension symbolic representation of a block dimension OpenCL call
SymbolicOpenCLKernelIndex symbolic representation of a kernel index OpenCL call
SymbolicOpenCLCalculateKernelIndex symbolic representation of an OpenCL index calculation
SymbolicOpenCLDeclareIndexBlock symbolic representation of an OpenCL index declaration

Symbolic representations of OpenCL programs.

Memory

OpenCLMemory handle to OpenCL memory registered using OpenCLMemoryLoad or OpenCLMemoryAllocate
OpenCLMemoryLoad load Mathematica memory into OpenCLLink, returning OpenCLMemory
OpenCLMemoryAllocate allocate memory for OpenCLLink, returning OpenCLMemory
OpenCLMemoryGet copy OpenCLMemory to Mathematica
OpenCLMemoryUnload unload and delete an OpenCLMemory handle
OpenCLMemoryInformation get OpenCLMemory handle information
OpenCLMemoryCopyToHost copy OpenCLMemory from GPU to CPU

Functions for working with memory in OpenCL.

Examples

OpenCLFractalRender3D compute and ray trace a 3D fractal
OpenCLImplicitRender3D compute and render an implict surface
OpenCLMersenneTwister generate random numbers on the GPU

Example applications of OpenCLLink.



ja zh

AltStyle によって変換されたページ (->オリジナル) /