Trait ndarray_rblas::AsBlas [] [src]

pub trait AsBlas<A, S, D> {
    fn blas_checked(&mut self) -> Result<BlasArrayViewMut<A, D>, ShapeError>
    where
        S: DataOwned + DataMut,
        A: Clone
; fn blas_view_checked(&self) -> Result<BlasArrayView<A, D>, ShapeError>
    where
        S: Data
; fn blas_view_mut_checked(
        &mut self
    ) -> Result<BlasArrayViewMut<A, D>, ShapeError>
    where
        S: DataMut
; fn blas(&mut self) -> BlasArrayViewMut<A, D>
    where
        S: DataOwned<Elem = A> + DataMut,
        A: Clone
, { ... } fn bv(&self) -> BlasArrayView<A, D>
    where
        S: Data
, { ... } fn bvm(&mut self) -> BlasArrayViewMut<A, D>
    where
        S: DataMut
, { ... } }

Convert an array into a blas friendly wrapper.

Note that blas suppors four different element types: f32, f64, Complex<f32>, and Complex<f64>.

Requires crate feature "rblas"

Required Methods

Return an array view implementing Vector (1D) or Matrix (2D) traits.

Elements are copied if needed to produce a contiguous matrix.
The result is always mutable, due to the requirement of having write access to update the layout either way. Breaks sharing if the array is an RcArray.

Errors if any dimension is larger than c_int::MAX.

Return a read-only array view implementing Vector (1D) or Matrix (2D) traits.

The array must already be in a blas compatible layout: its innermost dimension must be contiguous.

Errors if any dimension is larger than c_int::MAX.
Errors if the inner dimension is not c-contiguous.

Layout requirements may be loosened in the future.

Return a read-write array view implementing Vector (1D) or Matrix (2D) traits.

The array must already be in a blas compatible layout: its innermost dimension must be contiguous.

Errors if any dimension is larger than c_int::MAX.
Errors if the inner dimension is not c-contiguous.

Layout requirements may be loosened in the future.

Provided Methods

Equivalent to .blas_checked().unwrap()

Panics if there was a an error in .blas_checked().

bv stands for blas view.

Equivalent to .blas_view_checked().unwrap()

Panics if there was a an error in .blas_view_checked().

bvm stands for blas view mut.

Equivalent to .blas_view_mut_checked().unwrap()

Panics if there was a an error in .blas_view_mut_checked().

Implementors