Skip to main content
Log in

Mojo function

buffer_load_store_lds

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

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

This function is used to copy from global memory to shared memory (aka LDS) bypassing storing to register.

Parameters:

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

Args:

  • src_resource (SIMD[uint32, 4]): The buffer resource descriptor from make_buffer_resource.
  • gds_offset (SIMD[int32, 1]): Global memory offset.
  • lds_ptr_base (UnsafePointer[SIMD[type, 1], address_space=AddressSpace(3)]): LDS base address.
  • lds_offset (SIMD[int32, 1]): LDS offset.