execute_with_dtype

Macro execute_with_dtype 

Source
macro_rules! execute_with_dtype {
    (($lhs:expr, $rhs:expr),$element:ident,  $op:expr, [$($dtype: ident => $ty: ty),*]) => { ... };
    (($lhs:expr, $rhs:expr), $op:expr) => { ... };
    (($lhs:expr, $rhs:expr), $element:ident, $op:expr) => { ... };
    ($tensor:expr, $element:ident, $op:expr, [$($dtype: ident => $ty: ty),*]) => { ... };
    ($tensor:expr, $op:expr) => { ... };
    ($tensor:expr, $element:ident, $op:expr) => { ... };
}
Expand description

Macro to execute an operation a given element type.

ยงPanics

Since there is no automatic type cast at this time, binary operations for different floating point precision data types will panic with a data type mismatch.