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) => { ... };
}๐Deprecated since 0.22.0:
burn-ndarray is deprecated and will be removed in a future release. Use burn-flex for pure-Rust CPU execution (std, no_std, WebAssembly), or one of the CubeCL backends (burn-cuda, burn-rocm, burn-wgpu, burn-cpu) for GPU acceleration.
Expand description
Macro to execute an operation on a given element type.
Extracts the storage from NdArrayTensor, converts to SharedArray, and passes to operation.
ยง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.