Skip to main content

promote_dtype

Function promote_dtype 

Source
pub fn promote_dtype(lhs: DType, rhs: DType) -> DType
Expand description

Promote two dtypes according to tenferro’s public dtype-promotion lattice.

§Examples

use tenferro_tensor::validate::promote_dtype;
use tenferro_tensor::DType;

assert_eq!(promote_dtype(DType::I32, DType::F32), DType::F64);