更多信息和选项更多信息The CUDALink application must be loaded using Needs["CUDALink`"].CUDAFoldList works only on general vectors such as "Float", "Double", ….CUDAFoldList does not work on fixed vector structure types like "Float", "Integer32", ….CUDAFoldList does not work on symbolic input.CUDAFoldList is similar to FoldList.The value for f can be either Max, Min, Plus, Minus, or Times.
First, load the CUDALink application:
This folds an input list with the Plus operator and initial value 0:
CUDAFoldList 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: