Element-wise bitwise OR – a logical OR on a boolean input, and a bit-by-bit one on an integer.
Arguments
- lhs, rhs
(
arrayish)
Two inputs of the same data type and shape. Can be any integerish data type. R values assume the other operand's data type when it is in their data type category, and their default data type when neither operand has one.
Value
(arrayish)
Has the inputs' shape and data type.
See also
nv_or(), |
Examples
# two R values: both take an R integer's default data type
prim_or(12L, 10L)
#> AnvlArray
#> 14
#> [ CPUi32{} ]
# the R value is built at the array's data type instead
prim_or(12L, nv_scalar(10L, "i64"))
#> AnvlArray
#> 14
#> [ CPUi64{} ]