Skip to main content

Mojo function

masked_store

masked_store[size: Int, alignment: Int = 1](value: SIMD[dtype, size], addr: LegacyUnsafePointer[Scalar[dtype], address_space=address_space, origin=origin], mask: SIMD[DType.bool, size])

Stores a value at a memory location, skipping masked lanes.

Parameters:

  • size (Int): Size of value, the data to store.
  • alignment (Int): The alignment of the destination locations. Must be 0 or a power of two constant integer value. Default is 1.

Args:

  • value (SIMD): The vector containing data to store.
  • addr (LegacyUnsafePointer): A vector of memory location to store data at.
  • mask (SIMD): A binary vector which prevents memory access to certain lanes of value.

Was this page helpful?