Skip to main content

ClikaRT::ops::uniform_

function

uniform_()

Tensor& uniform_(
    Tensor& self,
    double low = 0.0,
    double high = 1.0,
    StreamOrDevice s = {}
)

In-place uniform fill on [low, high): overwrites self at its own shape/dtype and returns it under the value surface, Result<void> under the Result surface; CLIKART_CHECK is the mode-stable spelling.

Parameters

  • self: the tensor to fill; float dtype.
  • low: inclusive lower bound; default 0.0.
  • high: exclusive upper bound; default 1.0.
  • s: stream or device; default = self's.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when high <= low.

Declared in ClikaRT/compute/ops.h, line 4150