此为 Mathematica 8 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

$CUDADevice


is the CUDA device used in computation.
  • The CUDALink package must be loaded using Needs.
  • Set to , the CUDA computations are performed on the fastest device.
  • Changes to the device performed after execution of a CUDALink function are ignored.
First, load the CUDALink application:
This sets the computation device to 1:
Subsequent computation using any of the CUDALink functions will use the specified:
First, load the CUDALink application:
In[1]:=
Click for copyable input
This sets the computation device to 1:
In[2]:=
Click for copyable input
Out[2]=
Subsequent computation using any of the CUDALink functions will use the specified:
In[3]:=
Click for copyable input
Out[3]=