dpctl.SyclQueue.memset¶
- SyclQueue.memset(mem, val, count=0)¶
Fill USM allocation
memwith the byte valuevaland wait.Internally, this dispatches
sycl::queue::memset. The operation is byte-wise:countbytes are set, each to the same valueval.This is a synchronizing variant corresponding to
dpctl.SyclQueue.memset_async().- Parameters:
mem – Destination USM allocation, an instance of
dpctl.memory._Memory.val (int) – Value to fill
memwith. Followingsycl::queue::memset, it is interpreted as anunsigned char, i.e. only the least significant byte is used.count (int, optional) – Number of bytes to fill. If
0or greater than the size ofmem, the whole allocation is filled. Default:0.
- Raises:
TypeError – If
memis not an instance ofdpctl.memory._Memory.OverflowError – If
valdoes not fit in a Cintorcountis negative.RuntimeError – If the memset operation encountered an error.