Backend

Trait Backend 

Source
pub trait Backend {
Show 123 methods // Required methods fn name(&self) -> &'static str; fn has_cublas(&self) -> bool; unsafe fn alloc(&self, n: usize) -> Result<BackendArray>; fn alloc_and_store_zeros(&self, n: usize) -> Result<BackendArray>; fn alloc_and_store(&self, elems: &[f32]) -> Result<BackendArray>; fn load(&self, a: &BackendArray, elems: &mut [f32]) -> Result<()>; fn store(&self, a: &BackendArray, elems: &[f32]) -> Result<()>; fn copy(&self, a: &BackendArray, b: &BackendArray) -> Result<()>; fn transpose_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn add_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn add_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn add_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn add_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sub_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sub_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sub_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sub_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn mul_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>; fn mul_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>; fn mul_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>; fn mul_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>; fn mul_a_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn mul_at_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn mul_a_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn mul_at_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn div_a_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn div_at_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn div_a_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn div_at_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn add_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn add_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sub_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sub_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn rsub_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn rsub_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn mul_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn mul_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn div_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn div_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn rdiv_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn rdiv_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sigmoid_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sigmoid_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn tanh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn tanh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn swish_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn swish_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn softmax_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn softmax_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sqrt_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sqrt_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn repeat_col_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn repeat_row_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn abs_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn abs_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn pow_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn pow_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn pow_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn pow_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn pow_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn pow_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn rpow_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn rpow_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn exp_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn exp_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn ln_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn ln_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn log2_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn log2_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn log10_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn log10_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sin_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sin_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn cos_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn cos_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn tan_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn tan_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn asin_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn asin_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn acos_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn acos_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan2_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan2_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan2_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan2_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan2_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atan2_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn ratan2_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn ratan2_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sinh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn sinh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn cosh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn cosh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn asinh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn asinh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn acosh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn acosh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atanh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn atanh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn signum_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn signum_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn ceil_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn ceil_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn floor_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn floor_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn round_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn round_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn trunc_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn trunc_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn max_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn max_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn max_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn max_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn max_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn max_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn min_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn min_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn min_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn min_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn min_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>; fn min_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>;
}
Expand description

A backend trait.

The backend provides a low-level interface to computing platform (OpenCL or CUDA) for basic operations and functions on matrices. The backend methods operate on backend arrays which refers to areas of the device memory. The backend is low-level layer between a frontend and computing platform.

Required Methods§

Source

fn name(&self) -> &'static str

Returns the backend name.

Source

fn has_cublas(&self) -> bool

Returns true if the backend uses cuBLAS, otherwise false.

Source

unsafe fn alloc(&self, n: usize) -> Result<BackendArray>

Allocates a backend array.

Source

fn alloc_and_store_zeros(&self, n: usize) -> Result<BackendArray>

Allocates a backend array and stores zeros in the backend array.

Source

fn alloc_and_store(&self, elems: &[f32]) -> Result<BackendArray>

Allocates a backend array and stores the elements in the backend array.

Source

fn load(&self, a: &BackendArray, elems: &mut [f32]) -> Result<()>

Loads elements from the backenc array.

Source

fn store(&self, a: &BackendArray, elems: &[f32]) -> Result<()>

Stores elements in the backend array.

Source

fn copy(&self, a: &BackendArray, b: &BackendArray) -> Result<()>

Copies the a backend array to the b backend array.

Source

fn transpose_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Transposes the a matrix and then the result is in the b matrix (B=AT).

Source

fn add_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Adds the b matrix to the a matrix and then the result is in the c matrix (C=A+B).

Source

fn add_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Adds the b matrix to the transposed a matrix and then the result is in the c matrix (C=AT+B).

Source

fn add_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Adds the transposed b matrix to the a matrix and then the result is in the c matrix (C=A+BT).

Source

fn add_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Adds the transposed b matrix to the transposed a matrix and then the result is in the c matrix (C=AT+BT).

Source

fn sub_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the b matrix from the a matrix and then the result is in the c matrix (C=A-B).

Source

fn sub_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the b matrix from the transposed a matrix and then the result is in the c matrix (C=AT-B).

Source

fn sub_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the transposed b matrix from the a matrix and then the result is in the c matrix (C=A-BT).

Source

fn sub_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the transposed b matrix from the transposed a matrix and then the result is in the c matrix (C=AT-BT).

Source

fn mul_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>

Multiplies the a matrix by the b matrix and then the result is in the c matrix (C=A·B).

Source

fn mul_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>

Multiplies the transposed a matrix by the b matrix and then the result is in the c matrix (C=AT·B).

Source

fn mul_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>

Multiplies the a matrix by the transposed b matrix and then the result is in the c matrix (C=A·BT).

Source

fn mul_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, l: usize, ) -> Result<()>

Multiplies the transposed a matrix by the transposed b matrix and then the result is in the c matrix (C=AT·BT).

Source

fn mul_a_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Multiplies the a matrix elements by the b matrix elements and then the result is in the c matrix (cij=aij·bij).

Source

fn mul_at_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Multiplies the transposed a matrix elements by the b matrix elements and saves the result to the c matrix (cij=aji·bij).

Source

fn mul_a_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Multiplies the a matrix elements by the transposed b matrix elements and then the result is in the c matrix (cij=aij·bji).

Source

fn mul_at_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Multiplies the transposed a matrix elements by the transposed b matrix elements and then the result is in the c matrix. (cij=aji·bji).

Source

fn div_a_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the a matrix elements by the b matrix elements and then the result is in the c matrix (cij=aijbij).

Source

fn div_at_b_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the transposed a matrix elements by the b matrix elements and then the result is in the c matrix (cij=ajibij).

Source

fn div_a_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides thea matrix elements by the transposed b matrix elements and then the result is in the c matrix (cij=aijbji).

Source

fn div_at_bt_for_elems( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the transposed a matrix elements by the transposed b matrix elements and then the result is in the c matrix (cij=ajibji).

Source

fn add_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Adds the b scalar to the a matrix and then the result is in the c matrix (C=A+b).

Source

fn add_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Adds the b scalar to the transposed a matrix and then the result is in the c matrix (C=AT+b).

Source

fn sub_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the b scalar from the a matrix and then the result is in the c matrix. (C=A-b).

Source

fn sub_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the b scalar from the transposed a matrix and then the result is in the c matrix (C=AT-b).

Source

fn rsub_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the a matrix from the b scalar and then the result is in the c matrix (C=b-A).

Source

fn rsub_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Subtracts the transposed a matrix from the b scalar and then the result is in the c matrix (C=b-AT).

Source

fn mul_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Multiplies the a matrix by the b scalar and then the result is in the c matrix (C=A·b).

Source

fn mul_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Multiplies the transposed a matrix by the b scalar and then the result is in the c matrix (C=AT·b).

Source

fn div_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the a matrix by the b scalar and then the result is in the c matrix (C=Ab).

Source

fn div_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the transposed a matrix by the b scalar and then the result is in the c matrix (C=ATb).

Source

fn rdiv_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the b scalar by the a matrix elements and then the result is in the c matrix (cij=baij).

Source

fn rdiv_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Divides the b scalar by the transposed a matrix elements and then the result is in the c matrix (cij=baji).

Source

fn sigmoid_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates sigmoid function for the a matrix and then the result is in the b matrix (B=sigmoid(A)).

Source

fn sigmoid_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates sigmoid function for the transposed a matrix and then the result is in the b matrix (B=sigmoid(AT)).

Source

fn tanh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates hyperbolic tangent function for the a matrix and then the result is in b matrix (B=tanh(A)).

Source

fn tanh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates hyperbolic tangent function for the transposed a matrix and then the result is in the b matrix (B=tanh(AT)).

Source

fn swish_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates swish function for the a matrix and then the result is in the b matrix (B=swish(A)).

Source

fn swish_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates swish function for the transposed a matrix and then the result is in the b matrix (B=swish(AT)).

Source

fn softmax_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates softmax function for the a matrix and then the result is in the b matrix (B=softmax(A)).

Source

fn softmax_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates softmax function for the transposed a matrix and then the result is in the b matrix (B=softmax(AT)).

Source

fn sqrt_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates square roots of the a matrix elements and then the result is in the b matrix (bij=aij).

Source

fn sqrt_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates square roots of the transposed a matrix elements and then the result is in the b matrix (bij=aji).

Source

fn repeat_col_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Repeats the a vector as column (bij=ai).

Source

fn repeat_row_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Repeats the a vector as row (bij=aj).

Source

fn abs_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates absolute values of the a matrix elements and then the result is in the b matrix (bij=|aij|).

Source

fn abs_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates absolute values of the transposed a matrix elements and then the result is in the b matrix (bij=|aji|).

Source

fn pow_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the a matrix elements to the power of the b matrix elements and then the result is in the c matrix (cij=aijbij).

Source

fn pow_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the transposed a matrix elements to the power of the b matrix elements and then the result is in the c matrix (cij=ajibij).

Source

fn pow_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the a matrix elements to the power of the transposed b matrix elements and then the result is in the c matrix (cij=aijbji).

Source

fn pow_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the transposed a matrix elements to the power of the transposed b matrix elements and then the result is in the c matrix (cij=ajibji).

Source

fn pow_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the a matrix elements to the power of the b scalar and then the result is in the c matrix (cij=aijb).

Source

fn pow_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the transposed a matrix elements to the power of the b scalar and then the result is in the c matrix (cij=ajib).

Source

fn rpow_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the b scalar to the power of the a matrix elements and then the result is in the c matrix (cij=baij).

Source

fn rpow_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Raises the b scalar to the power of the transposed a matrix elements and then the result is in the c matrix (cij=baji).

Source

fn exp_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates exponential function for the a matrix and then the result is in the b matrix (bij=eaij).

Source

fn exp_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates exponential function for the transposed a matrix elements and then the result is in the b matrix (bij=eaji).

Source

fn ln_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates natural logarithm of the a matrix elements and then the result is in the b matrix (bij=lnaij).

Source

fn ln_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates natural logarithm of the transposed a matrix elements and then the result is in the b matrix (bij=lnaji).

Source

fn log2_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates base 2 logarithm of the a matrix elements and then the result is in the b matrix (bij=log2aij).

Source

fn log2_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates base 2 logarithm of the transposed a matrix elements and then the result is in the b matrix (bij=log2aji).

Source

fn log10_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates base 10 logarithm of the a matrix elements and then the result is in the b matrix (bij=log10aij).

Source

fn log10_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates base 10 logarithm of the transposed a matrix elements and then the result is in the b matrix (bij=log10aji).

Source

fn sin_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates sine function for the a matrix and then the result is in the b matrix (B=sin(A)).

Source

fn sin_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates sine function for the transposed a matrix and then the result is in the b matrix (B=sin(AT)).

Source

fn cos_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates cosine function for the a matrix and then the result is in the b matrix (B=cos(A)).

Source

fn cos_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates cosine function for the transposed a matrix and then the result is in the b matrix (B=cos(AT)).

Source

fn tan_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates tangent function for the a matrix and then the result is in the b matrix (B=tan(A)).

Source

fn tan_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates tangent function for the transposed a matrix and then the result is in the b matrix (B=tan(AT)).

Source

fn asin_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arcsine function for the a matrix and then the result is in the b matrix (B=arcsin(A)).

Source

fn asin_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arcsine function for the transposed a matrix and then the result is in the b matrix (B=arcsin(AT)).

Source

fn acos_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arccosine function for the a matrix and then the result is in the b matrix (B=arccos(A)).

Source

fn acos_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arccosine function for the transposed a matrix and then the result is in the b matrix (B=arccos(AT)).

Source

fn atan_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the a matrix and then the result is in the b matrix (B=arctan(A)).

Source

fn atan_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the transposed a matrix and then the result is in the b matrix (B=arctan(AT)).

Source

fn atan2_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the a matrix elements and the b matrix elements and then the result is in the c matrix (cij=arctan(aijbij)).

Source

fn atan2_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the transposed a matrix elements and the b matrix elements and then the result is in the c matrix (cij=arctan(aijbij)).

Source

fn atan2_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the a matrix elements and the transposed b matrix elements and then the result is in the c matrix (cij=arctan(aijbji)).

Source

fn atan2_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the transposeda matrix elements and the transposed b matrix elements and then the result is in the c matrix (cij=arctan(ajibji)).

Source

fn atan2_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the a matrix elements and the b scalar and then the result is in the c matrix (cij=arctan(aijb)).

Source

fn atan2_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the transposed a matrix elements and the b scalar and then the result is in the c matrix (cij=arctan(ajib)).

Source

fn ratan2_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the b scalar and the a matrix elements and then the result is in the c matrix (cij=arctan(baij)).

Source

fn ratan2_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates arctangent function for the b scalar and the transposed a matrix elements and then the result is in the c matrix (cij=arctan(baji)).

Source

fn sinh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates hyperbolic sine function for the a matrix and then the result is in the b matrix (B=sinh(A)).

Source

fn sinh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates hyperbolic sine function for the transposed a matrix and then the result is in the b matrix (B=sinh(AT)).

Source

fn cosh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates hyperbolic cosine function for the a matrix and then the result is in the b matrix (B=cosh(A)).

Source

fn cosh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates hyperbolic cosine function for the transposed a matrix and then the result is in the b matrix (B=cosh(AT)).

Source

fn asinh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates inverse hyperbolic sine function for the a matrix and then the result is in the b matrix (B=arsinh(A)).

Source

fn asinh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates inverse hyperbolic sine function for the transposed a matrix and then the result is in the b matrix (B=arsinh(AT)).

Source

fn acosh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates inverse hyperbolic cosine function for the a matrix and then the result is in the b matrix (B=arcosh(A)).

Source

fn acosh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates inverse hyperbolic cosine function for the transposed a matrix and then the result is in the b matrix (B=arcosh(AT)).

Source

fn atanh_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates inverse hyperbolic tangent function for the a matrix and then the result is in the b matrix (B=artanh(A)).

Source

fn atanh_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates inverse hyperbolic tangent function for the transposed a matrix and then the result is in the b matrix (B=artanh(AT)).

Source

fn signum_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates signum function for the a matrix and then the result is in the b matrix (B=sgn(A)).

Source

fn signum_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates signum function for the transposed a matrix and then the result is in the b matrix (B=sgn(AT)).

Source

fn ceil_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates ceil function for the a matrix and then the result is in the b matrix (B=ceil(A)).

Source

fn ceil_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates ceil function for the transposed a matrix and then the result is in the b matrix (B=ceil(AT)).

Source

fn floor_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates floor function for the a matrix and then the result is in the b matrix (B=floor(A)).

Source

fn floor_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates floor function for the transposed a matrix and then the result is in the b matrix (B=floor(AT)).

Source

fn round_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates round function for the a matrix and then the result is in the b matrix (B=round(A)).

Source

fn round_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates round function for the transposed a matrix and then the result is in the b matrix (B=round(AT)).

Source

fn trunc_a( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates trunc function for the a matrix and then the result is in the b matrix (B=trunc(A)).

Source

fn trunc_at( &self, a: &BackendArray, b: &BackendArray, n: usize, m: usize, ) -> Result<()>

Calculates trunc function for the transposed a matrix and then the result is in the b matrix (B=trunc(AT)).

Source

fn max_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds maximum values between the a matrix elements and the b matrix elements and then the result is in the c matrix (cij=max(aij,bij)).

Source

fn max_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds maximum values between the transposed a matrix elements and the b matrix elements and then the result is in the c matrix (cij=max(aji,bij)).

Source

fn max_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds maximum values between the a matrix elements and the transposed b matrix elements and then the result is in the c matrix (cij=max(aij,bji)).

Source

fn max_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds maximum values between the transposed a matrix elements and the transposed b matrix elements and then the result is in the c matrix (cij=max(aji,bji)).

Source

fn max_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds maximum values between the a matrix elements and the b scalar and then the result is in the c matrix (cij=max(aij,b)).

Source

fn max_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds maximum values between the transposed a matrix elements and the b scalar and then the result is in the c matrix (cij=max(aji,b)).

Source

fn min_a_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds minimum values between the a matrix elements and the b matrix elements and then the result is in the c matrix (cij=min(aij,bij)).

Source

fn min_at_b( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds minimum values between the transposed a matrix elements and the b matrix elements and then the result is in the c matrix (cij=min(aji,bij)).

Source

fn min_a_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds minimum values between the a matrix elements and the transposed b matrix elements and then the result is in the c matrix (cij=min(aij,bji)).

Source

fn min_at_bt( &self, a: &BackendArray, b: &BackendArray, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds minimum values between the transposed a matrix elements and the transposed b matrix elements and then the result is in the c matrix (cij=min(aji,bji)).

Source

fn min_a_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds minimum values between the a matrix elements and the b scalar and then the result is in the c matrix (cij=min(aij,b)).

Source

fn min_at_b_for_scalar( &self, a: &BackendArray, b: f32, c: &BackendArray, n: usize, m: usize, ) -> Result<()>

Finds minimum values between the transposed a matrix elements and the b scalar and then the result is in the c matrix (cij=min(aji,b)).

Implementors§