R/api.R
nv_promote_to_common.Rd
Promote tensors to a common data type, see common_dtype for more details.
common_dtype
nv_promote_to_common(...)
(tensorish) Tensors to promote.
tensorish
(list() of tensorish)
list()
jit_eval({ x <- nv_tensor(1L) y <- nv_tensor(1.5) # integer is promoted to float nv_promote_to_common(x, y) }) #> [[1]] #> AnvilTensor #> 1 #> [ CPUf32{1} ] #> #> [[2]] #> AnvilTensor #> 1.5000 #> [ CPUf32{1} ] #>