linalg::CoopMat<T, MemoryScope S, int M, int N, linalg.CoopMatMatrixUse R>.MapElement
Description
Applies a per-element operation to the cooperative matrix. Requires Vulkan with SPV_NV_cooperative_matrix2 extension.
Signature
linalg.CoopMat<T, S, M, N, R> linalg::CoopMat<T, MemoryScope S, int M, int N, linalg.CoopMatMatrixUseR>.MapElement( (uint, uint, T)->T mapOp) where T : __BuiltinArithmeticType; linalg.CoopMat<T, S, M, N, R> linalg::CoopMat<T, MemoryScope S, int M, int N, linalg.CoopMatMatrixUseR>.MapElement<TFunc>( TFunc mapOp) where TFunc : IFunc<T, uint, uint, T> where T : __BuiltinArithmeticType;
Generic Parameters
TFunc: IFunc<T, uint, uint, T>
Parameters
mapOp : ( uint, uint, T ) -> T
A function that takes (row, column, element) and returns a new element value.
mapOp : TFunc
A function that takes (row, column, element) and returns a new element value.
Return value
A new cooperative matrix with the operation applied to each element.
Availability and Requirements
Defined for the following targets:
spirv
Available in all stages.
Requires capability: spvCooperativeMatrixPerElementOperationsNV.