abs
all
any
cos
ddx
ddy
dot
dst
exp
fma
lit
log
mad
max
min
mul
pow
rcp
sin
tan
Expand Minimize

InterlockedMax function

Performs a guaranteed atomic max.

Syntax

void InterlockedMax(
  in   R dest,
  in   T value,
  out  T original_value
);

Parameters

dest [in]

Type: R

The destination address.

value [in]

Type: T

The input value.

original_value [out]

Type: T

Optional. The original input value.

Return value

This function does not return a value.

Remarks

This operation can only be performed on int and uint typed resources and shared memory variables. There are two possible uses for this function. The first is when R is a shared memory variable type. In this case, the function performs an atomic max of value to the shared memory register referenced by dest. The second scenario is when R is a resource variable type. In this scenario, the function performs an atomic max of value to the resource location referenced by dest. The overloaded function has an additional output variable which will be set to the original value of dest. This overloaded operation is only available when R is readable and writable.

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 and higher shader modelsyes

 

This function is supported in the following types of shaders:

VertexHullDomainGeometryPixelCompute
xx

 

See also

Shader Model 5

 

 

Community Additions

ADD
Show:
© 2014 Microsoft