Skip to main content

reshape_col_major_native_tensor

Function reshape_col_major_native_tensor 

Source
pub fn reshape_col_major_native_tensor(
    tensor: &Tensor,
    logical_dims: &[usize],
) -> Result<Tensor>
Expand description

Reshape a native tensor without changing its column-major linearization.

§Errors

Fails with a CpuExecutionContextError when the default context’s engine is already borrowed on this thread, or when the shape logical_dims and the element count of tensor do not match.