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

Description

Stores the cooperative matrix into a pointer buffer with coherent memory access. Ensures memory writes are made available across the specified memory scope. Vulkan only.

Signature

void linalg::CoopMat<T, MemoryScope S, int M, int N, linalg.CoopMatMatrixUseR>.StoreCoherent<linalg.CoopMatMatrixLayoutmatrixLayout>(
    Ptr<T, Access.ReadWrite, AddressSpace.Device, DefaultDataLayout> buffer,
    uint element,
    uint stride,
    MemoryScope memoryScope)
    where T : ICoopElement;

Generic Parameters

matrixLayout : linalg.CoopMatMatrixLayout

The memory layout (RowMajor or ColMajor) to use when storing.

Parameters

buffer : Ptr<T, Access.ReadWrite, AddressSpace.Device, DefaultDataLayout>

The pointer to the buffer to store the matrix into.

element : uint

The starting element index in the buffer.

stride : uint

The stride in elements between consecutive rows (for row major) or columns (for column major).

memoryScope : MemoryScope

The scope across which the write should be made visible (e.g., Device, Workgroup).

Availability and Requirements

Defined for the following targets:

spirv

Available in all stages.

Requires capabilities: spvCooperativeMatrixKHR, spvVulkanMemoryModelKHR, spvVulkanMemoryModelDeviceScopeKHR.