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

CUDAMap


applies f to each element on lst.
  • The CUDALink application must be loaded using Needs.
  • works only on general vector types such as , , ....
  • does not work on fixed vector structure types like , , ....
  • does not work on symbolic input.
  • is equivalent to Map.
First, load the CUDALink application:
This maps the Cos operator on an input list:
The above is equivalent to Map:
The input can be CUDAMemory. This loads a list using CUDAMemoryLoad:
This applies Abs on the input memory:
The memory returned can be retrieved using CUDAMemoryGet:
First, load the CUDALink application:
In[1]:=
Click for copyable input
This maps the Cos operator on an input list:
In[2]:=
Click for copyable input
Out[2]=
The above is equivalent to Map:
In[3]:=
Click for copyable input
Out[3]=
 
The input can be CUDAMemory. This loads a list using CUDAMemoryLoad:
In[1]:=
Click for copyable input
Out[1]=
This applies Abs on the input memory:
In[2]:=
Click for copyable input
Out[2]=
The memory returned can be retrieved using CUDAMemoryGet:
In[3]:=
Click for copyable input
Out[3]=
The output type is the same as the input. If the input is a list of integers, then the decimals are dropped:
The above is not equivalent to Map: