remove ndarray transmute

This commit is contained in:
Magnus Ulimoen 2021-02-02 00:11:41 +01:00
parent 74d99a4a18
commit c709cf465e
1 changed files with 3 additions and 1 deletions

View File

@ -200,8 +200,9 @@ pub(crate) fn diff_op_2d_fallback<const M: usize, const N: usize, const D: usize
matrix: &BlockMatrix<Float, M, N, D>, matrix: &BlockMatrix<Float, M, N, D>,
optype: OperatorType, optype: OperatorType,
prev: ArrayView2<Float>, prev: ArrayView2<Float>,
fut: ArrayViewMut2<Float>, mut fut: ArrayViewMut2<Float>,
) { ) {
/* Does not increase the perf...
#[cfg(feature = "fast-float")] #[cfg(feature = "fast-float")]
let (matrix, prev, mut fut) = unsafe { let (matrix, prev, mut fut) = unsafe {
( (
@ -212,6 +213,7 @@ pub(crate) fn diff_op_2d_fallback<const M: usize, const N: usize, const D: usize
}; };
#[cfg(not(feature = "fast-float"))] #[cfg(not(feature = "fast-float"))]
let mut fut = fut; let mut fut = fut;
*/
assert_eq!(prev.shape(), fut.shape()); assert_eq!(prev.shape(), fut.shape());
let nx = prev.shape()[1]; let nx = prev.shape()[1];