CUDALink`
CUDALink`

CUDAFold

CUDAFold[f,x,list]

gives the last element of CUDAFoldList[f,x,list].

Details and Options

  • The CUDALink application must be loaded using Needs["CUDALink`"].
  • CUDAFold works only on vectors.
  • CUDAFold does not work on fixed vector structure types like "Float[2]", "Integer32[2]", .
  • CUDAFold does not work on symbolic input.
  • CUDAFold is equivalent to Fold.
  • The value for f can be either Max, Min, Plus, Minus, or Times.

Examples

Basic Examples  (3)

First, load the CUDALink application:

This folds an input list with the Plus operator and initial value 0:

The above is equivalent to Fold:

CUDAFold operates on input CUDAMemory:

This folds the CUDAMemory as before:

Note that the output type is the same as the inputthat is, if the input is a Real valued list, then the output is a real number.

Compared to Fold, only a few operations are supported by CUDAFold:

Wolfram Research (2010), CUDAFold, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAFold.html.

Text

Wolfram Research (2010), CUDAFold, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAFold.html.

CMS

Wolfram Language. 2010. "CUDAFold." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAFold.html.

APA

Wolfram Language. (2010). CUDAFold. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CUDALink/ref/CUDAFold.html

BibTeX

@misc{reference.wolfram_2023_cudafold, author="Wolfram Research", title="{CUDAFold}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAFold.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_cudafold, organization={Wolfram Research}, title={CUDAFold}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAFold.html}, note=[Accessed: 19-March-2024 ]}