fn
random_randint_storage
→Storageint random_randint_storage(const int & shape, int low, int high, Dtype dt, Device device, Generator & gen)Generate uniform random integers in the half-open interval [low, high).
Uses batched uint32 generation from gen for throughput, then
folds the raw bytes into the requested integer range.
Parameters
shapeconst Shape&Output shape.
lowstd::int64_tInclusive lower bound.
highstd::int64_tExclusive upper bound (
high > low).dtDtypeOutput dtype;
I32 or I64 only.deviceDeviceTarget device.
genGenerator&Random-number generator.
Returns
StorageNew storage of shape shape with integer samples.