Skip to contents

Element-wise reciprocal square root, i.e. 1 / sqrt(x).

Usage

nv_rsqrt(operand)

Arguments

operand

(tensorish)
Operand.

Value

tensorish
Has the same shape and data type as the input.

See also

nvl_rsqrt() for the underlying primitive.

Examples

jit_eval({
  x <- nv_tensor(c(1, 4, 9))
  nv_rsqrt(x)
})
#> AnvilTensor
#>  1.0000
#>  0.5000
#>  0.3333
#> [ CPUf32{3} ]