Skip to main content
Log in

Mojo function

strided_load

strided_load[type: DType, //, simd_width: Int](addr: UnsafePointer[SIMD[type, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin], stride: Int, mask: SIMD[bool, simd_width] = SIMD(True)) -> SIMD[type, simd_width]

Loads values from addr according to a specific stride.

Parameters:

  • type (DType): DType of value, the value to store.
  • simd_width (Int): The width of the SIMD vectors.

Args:

  • addr (UnsafePointer[SIMD[type, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin]): The memory location to load data from.
  • stride (Int): How many lanes to skip before loading again.
  • mask (SIMD[bool, simd_width]): A binary vector which prevents memory access to certain lanes of value.

Returns:

A vector containing the loaded data.