$CUDADevice


is the CUDA device used in computation.

更多信息更多信息

  • The CUDALink package must be loaded using Needs["CUDALink`"].
  • Set to , the CUDA computations are performed on the fastest device.
  • Changes to the device performed after execution of a CUDALink function are ignored.

范例范例打开所有单元关闭所有单元

基本范例 (1)基本范例 (1)

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]=
New to Mathematica? Find your learning path »
Have a question? Ask support »