Skip to contents

Element-wise ceiling.

Usage

prim_ceil(x)

Arguments

x

(arrayish)
One input. Can be any float data type. An R value materializes at its default data type.

Value

(arrayish)
Has the input's shape and data type.

Implemented Rules

  • stablehlo

  • quickr

  • reverse

StableHLO

Lowers to hlo_ceil(), specified under ceil.

Examples

# the input's data type carries through
x <- nv_array(c(1.2, 2.7, -1.5))
prim_ceil(x)
#> AnvlArray
#>   2
#>   3
#>  -1
#> [ CPUf32{3} ] 

# an R value materializes at its default data type
prim_ceil(1.2)
#> AnvlArray
#>  2
#> [ CPUf32{} ]