CoopVec<T, int N>.matMulAccumPacked

Description

Multiply the given input Cooperative vector with the given matrix and accumulate the result into this vector.

Signature

void CoopVec<T, int N>.matMulAccumPacked<U, int PackedK>(
    CoopVec<U, PackedK> input,
    CoopVecComponentType inputInterpretation,
    int k,
    RWByteAddressBuffer matrix,
    int matrixOffset,
    CoopVecComponentType matrixInterpretation,
    CoopVecMatrixLayout memoryLayout,
    bool transpose,
    uint matrixStride)
    where U : __BuiltinArithmeticType
    where T : __BuiltinArithmeticType;

void CoopVec<T, int N>.matMulAccumPacked<U, int PackedK>(
    CoopVec<U, PackedK> input,
    CoopVecComponentType inputInterpretation,
    int k,
    ByteAddressBuffer matrix,
    int matrixOffset,
    CoopVecComponentType matrixInterpretation,
    CoopVecMatrixLayout memoryLayout,
    bool transpose,
    uint matrixStride)
    where U : __BuiltinArithmeticType
    where T : __BuiltinArithmeticType;

Generic Parameters

U: __BuiltinArithmeticType

PackedK : int

Parameters

input : CoopVec<U, PackedK>

The input Cooperative vector to multiply with the matrix.

inputInterpretation : CoopVecComponentType

Specifies how to interpret the values in the input vector (e.g. as packed values).

k : int

The number of columns in the matrix.

matrix : RWByteAddressBuffer

The matrix buffer to multiply with.

matrixOffset : int

Byte offset into the matrix buffer.

matrixInterpretation : CoopVecComponentType

Specifies how to interpret the values in the matrix.

memoryLayout : CoopVecMatrixLayout

Specifies the memory layout of the matrix (row-major or column-major).

transpose : bool

Whether to transpose the matrix before multiplication.

matrixStride : uint

The stride between matrix rows/columns in bytes.

matrix : ByteAddressBuffer

The matrix buffer to multiply with.

Remarks

Unlike matMulAccum, this function supports packed input interpretations where multiple values can be packed into each element of the input vector. The k parameter specifies the actual number of values to use from the packed input.

Availability and Requirements

Defined for the following targets:

hlsl

Available in all stages.

glsl

Available in all stages.

cpp

Available in all stages.

cuda

Available in all stages.

Requires capability: optix_coopvec.

spirv

Available in all stages.

Requires capability: spvCooperativeVectorNV.