Mojo function
memset
memset[type: AnyType, address_space: AddressSpace](ptr: UnsafePointer[type, address_space=address_space], value: SIMD[uint8, 1], count: Int)
Fills memory with the given value.
Parameters:
- type (
AnyType
): The element dtype. - 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. - value (
SIMD[uint8, 1]
): The value to fill with. - count (
Int
): Number of elements to fill (in elements, not bytes).
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!