fn
make_zero_storage
→Storageint make_zero_storage(const int & shape, Dtype dtype, Device device)Allocate a zero-filled Storage on the requested device.
Parameters
shapeconst Shape&N-D shape of the resulting storage.
dtypeDtypeElement dtype.
deviceDeviceTarget device (
CPU uses Accelerate; GPU allocates an MLX array).Returns
StorageNewly allocated storage with every element equal to zero.