linalg::CoopMat<T, MemoryScope S, int M, int N, linalg.CoopMatMatrixUse R>.clear

Description

Sets all elements of the cooperative matrix to zero. On CUDA, uses integer zero-fill which enables CSE to a single register, reducing register pressure when the zero matrix is used as an MMA accumulator.

Signature

void linalg::CoopMat<T, MemoryScope S, int M, int N, linalg.CoopMatMatrixUseR>.clear()
    where T : ICoopElement;

Availability and Requirements

Defined for the following targets:

hlsl

Available in all stages.

cuda

Available in all stages.

metal

Available in all stages.

spirv

Available in all stages.

Requires capability: spvCooperativeMatrixKHR.