coopVecReduceSumAccumulate

Description

Accumulate the sum of a cooperative vector into a buffer at the specified offset.

Signature

/// Requires Capability Set 1:
void coopVecReduceSumAccumulate<T, N:int>(
    CoopVec<T, N> v,
    RWByteAddressBuffer buffer,
    int offset)
    where T : __BuiltinArithmeticType;

/// Requires Capability Set 2:
void coopVecReduceSumAccumulate<T, N:int, IgnoredBufferElementType>(
    CoopVec<T, N> v,
    RWStructuredBuffer<IgnoredBufferElementType, DefaultDataLayout> buffer,
    int offset)
    where T : __BuiltinArithmeticType;

/// Requires Capability Set 2:
void coopVecReduceSumAccumulate<T, N:int, U, IgnoredBufferSize:int>(
    CoopVec<T, N> v,
    U[IgnoredBufferSize] buffer,
    int offset)
    where T : __BuiltinArithmeticType;

Generic Parameters

T: __BuiltinArithmeticType

N : int

IgnoredBufferElementType

U

IgnoredBufferSize : int

Parameters

v : CoopVec<T, N>

The cooperative vector to sum.

buffer : RWByteAddressBuffer

The buffer to accumulate the sum into.

offset : int

Byte offset into the buffer.

buffer : RWStructuredBuffer<IgnoredBufferElementType, DefaultDataLayout>

The buffer to accumulate the sum into.

buffer : U [ IgnoredBufferSize ]

The buffer to accumulate the sum into.

Availability and Requirements

Capability Set 1

Defined for the following targets:

hlsl

Available in all stages.

Requires capability: hlsl_coopvec_poc.

cpp

Available in all stages.

cuda

Available in all stages.

Requires capability: optix_coopvec.

spirv

Available in all stages.

Requires capability: spvCooperativeVectorNV.

Capability Set 2

Defined for the following targets:

spirv

Available in all stages.

Requires capability: spvCooperativeVectorTrainingNV.