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

CUDAFoldList


gives .
  • The CUDALink application must be loaded using Needs.
  • works only on general vectors such as , , ....
  • does not work on fixed vector structure types like , , ....
  • does not work on symbolic input.
First, load the CUDALink application:
This folds an input list with the Plus operator and initial value 0:
operates on input CUDAMemory:
This folds the CUDAMemory as before:
The memory returned can be retrieved using CUDAMemoryGet:
Compared to FoldList, only a few operations are supported by CUDAFold:
First, load the CUDALink application:
In[1]:=
Click for copyable input
This folds an input list with the Plus operator and initial value 0:
In[2]:=
Click for copyable input
Out[2]=
 
operates on input CUDAMemory:
In[1]:=
Click for copyable input
Out[1]=
This folds the CUDAMemory as before:
In[2]:=
Click for copyable input
Out[2]=
The memory returned can be retrieved using CUDAMemoryGet:
In[3]:=
Click for copyable input
Out[3]=
 
Compared to FoldList, only a few operations are supported by CUDAFold:
In[1]:=
Click for copyable input
Out[1]=
output does not contain the last element of FoldList: