Skip to main content

function

memset_zero

memset_zero[type: DType, address_space: AddressSpace](ptr: DTypePointer[type, address_space], count: Int)

Fills memory with zeros.

Parameters:

  • type (DType): The element dtype.
  • address_space (AddressSpace): The address space of the pointer.

Args:

  • ptr (DTypePointer[type, address_space]): Pointer to the beginning of the memory block to fill.
  • count (Int): Number of elements to set (in elements, not bytes).

memset_zero[type: AnyRegType, address_space: AddressSpace](ptr: LegacyPointer[type, address_space], count: Int)

Fills memory with zeros.

Parameters:

  • type (AnyRegType): The element type.
  • address_space (AddressSpace): The address space of the pointer.

Args:

  • ptr (LegacyPointer[type, address_space]): Pointer to the beginning of the memory block to fill.
  • count (Int): Number of elements to fill (in elements, not bytes).