Matrices, views and vectors: helpers

Overview

Free functions over matrices, views and vectors.

Functions

◆ get_effective_dims() [1/2]

template<typename T = float, MatrixFormat MType = MatrixFormat::Dense>
std::pair< int, int > batchlas::get_effective_dims ( const MatrixView< T, MType > & mat,
Transpose trans )

Shape (rows, cols) of op(mat) for trans: swapped unless NoTrans.

Definition at line 2159 of file matrix.hh.

◆ get_effective_dims() [2/2]

template<typename T = float, MatrixFormat MType = MatrixFormat::Dense>
std::pair< int, int > batchlas::get_effective_dims ( const MatrixView< T, MType > & mat,
Transpose trans,
int batch_index )

Shape of op(mat) for item batch_index, using that item's active extents.

Definition at line 2168 of file matrix.hh.

◆ operator<<() [1/2]

template<typename T, MatrixFormat MType>
std::ostream & batchlas::operator<< ( std::ostream & os,
const MatrixView< T, MType > & view )

Prints with MatrixView::stream_formatted_to() defaults.

Definition at line 2179 of file matrix.hh.

◆ operator<<() [2/2]

template<typename T>
std::ostream & batchlas::operator<< ( std::ostream & os,
const VectorView< T > & view )

Prints with VectorView::stream_formatted_to() defaults.

Definition at line 2186 of file matrix.hh.

◆ swap()

template<typename T>
void batchlas::swap ( UnifiedVector< T > & lhs,
UnifiedVector< T > & rhs )
inlineconstexpr

Swaps the storage of two vectors without copying; found by ADL.

Definition at line 163 of file sycl-vector.hh.