Mojo function
memset_zero
memset_zero[type: AnyType, address_space: AddressSpace, //](ptr: UnsafePointer[type, address_space=address_space], count: Int)
Fills memory with zeros.
Parameters:
- type (
AnyType
): The element type. - address_space (
AddressSpace
): The address space of the pointer.
Args:
- ptr (
UnsafePointer[type, address_space=address_space]
): UnsafePointer to the beginning of the memory block to fill. - count (
Int
): Number of elements to fill (in elements, not bytes).
memset_zero[type: DType, address_space: AddressSpace, //, *, count: Int](ptr: UnsafePointer[SIMD[type, 1], address_space=address_space])
Fills memory with zeros.
Parameters:
- type (
DType
): The element type. - address_space (
AddressSpace
): The address space of the pointer. - count (
Int
): Number of elements to fill (in elements, not bytes).
Args:
- ptr (
UnsafePointer[SIMD[type, 1], address_space=address_space]
): UnsafePointer to the beginning of the memory block to fill.

Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!