CUDALink`
CUDALink`

CUDAClamp

CUDAClamp[lst]

clamps the values of lst between automatically determined values.

CUDAClamp[lst,low,high]

clamps the values of lst between low and high.

更多信息和选项

  • The CUDALink application must be loaded using Needs["CUDALink`"].
  • CUDAClamp works only on general types such as "Float", "Double", .
  • CUDAClamp does not work on fixed vector structure types like "Float[2]", "Integer32[2]", .
  • CUDAClamp does not work on symbolic input.
  • If low and high are not specified, then low is 0.0 and high is 1.0 if the input is floating point. If the input is integers, then low is 0 and high is 255.

范例

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

基本范例  (5)

First, load the CUDALink application:

This clamps the values of an integer list:

The above is equivalent to Map:

The clamp values can be made explicit:

The input can be floating point:

The input can be an image, which is interpreted as a list of integers:

The high clamp parameter can be omitted:

The input can be CUDAMemory. This loads a list using CUDAMemoryLoad:

This clamps the values between -5 and 5:

The memory returned can be retrieved using CUDAMemoryGet:

Applications  (1)

CUDAClamp can be used to process geographic elevation data. This loads the data from the Wolfram servers:

This clamps the values of the elevation data:

Interactive Examples  (2)

This allows the user to interactively change the clamp values:

The same can be applied for datasets:

Wolfram Research (2010),CUDAClamp,Wolfram 语言函数,https://reference.wolfram.com/language/CUDALink/ref/CUDAClamp.html.

文本

Wolfram Research (2010),CUDAClamp,Wolfram 语言函数,https://reference.wolfram.com/language/CUDALink/ref/CUDAClamp.html.

CMS

Wolfram 语言. 2010. "CUDAClamp." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAClamp.html.

APA

Wolfram 语言. (2010). CUDAClamp. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/CUDALink/ref/CUDAClamp.html 年

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_cudaclamp, organization={Wolfram Research}, title={CUDAClamp}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAClamp.html}, note=[Accessed: 22-November-2024 ]}