Memset
From the docs -
memset memset[type: DType, address_space: AddressSpace](ptr: DTypePointer[type, address_space], value: SIMD[ui8, 1], count: Int) Fills memory with the given value. 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. value (SIMD[ui8, 1]): The value to fill with. count (Int): Number of elements to fill (in elements, not bytes).Shouldn't the type of value be of type rather than SIMD[ui8, 1]? For example The above code gives an error since 1.0 cannot be converted to ui8
1 Reply
I think
memset
is probably too low level to support this.
That said, I agree we could have a function/method to fill simd values.