Module Tolk_frontend.Dtype_ops
Type conversions.
Numeric casts change the element type, converting values with the usual rounding and range rules. Bitcasts reinterpret the underlying bits and require matching element sizes.
val cast : Tensor.t -> Tolk_uop.Dtype.t -> Tensor.tcast t dt converts t to element type dt. Returns t unchanged when its dtype is already dt.
val bitcast : Tensor.t -> Tolk_uop.Dtype.t -> Tensor.tbitcast t dt reinterprets the bits of t as dt without conversion.
val is_floating_point : Tensor.t -> boolis_floating_point t is true iff t's scalar dtype is a floating-point type.
val element_size : Tensor.t -> intelement_size t is the size in bytes of one element of t.