Skip to main content

Mojo function

buffer_load_store_lds

buffer_load_store_lds[dtype: DType](src_resource: SIMD[uint32, 4], gds_offset: SIMD[int32, 1], lds_ptr_base: UnsafePointer[SIMD[dtype, 1], address_space=AddressSpace(3)], lds_offset: SIMD[int32, 1])

Loads four bytes from global memory and writes them to shared memory.

Copies from global memory to shared memory (aka LDS) bypassing storing to register.

Parameters:

  • dtype (DType): The dtype of the data to be loaded.

Args:

  • src_resource (SIMD): Buffer resource descriptor from make_buffer_resource.
  • gds_offset (SIMD): Global memory offset.
  • lds_ptr_base (UnsafePointer): LDS base address.
  • lds_offset (SIMD): LDS offset.

Was this page helpful?