openGPMP
Open Source Mathematics Package
|
Mtx class offers matrix arithmetic operations. Some methods are element-wise while others make use of grouping and unrolling. More...
#include <mtx.hpp>
Public Member Functions | |
template<typename T > | |
void | std_mtx_add (const T *A, const T *B, T *C, int rows, int cols) |
Perform matrix addition on two matrices as flat arrays. More... | |
template<typename T > | |
void | std_mtx_sub (const T *A, const T *B, T *C, int rows, int cols) |
Perform matrix subtraction on two matrices as flat arrays. More... | |
template<typename T , typename U > | |
void | std_mtx_mult (const T *A, const T *B, U *C, int rows_a, int cols_a, int cols_b) |
template<typename T > | |
void | std_mtx_tpose (const T *A, T *At, int rows, int cols) |
template<typename T > | |
void | std_mtx_add (const std::vector< T > &A, const std::vector< T > &B, std::vector< T > &C) |
Perform matrix addition on two matrices as flat vectors. More... | |
template<typename T > | |
void | std_mtx_add (const std::vector< std::vector< T >> &A, const std::vector< std::vector< T >> &B, std::vector< std::vector< T >> &C) |
Perform matrix addition on two matrices as 2D vectors. More... | |
template<typename T > | |
void | std_mtx_sub (const std::vector< std::vector< T >> &A, const std::vector< std::vector< T >> &B, std::vector< std::vector< T >> &C) |
Perform matrix subtraction on two matrices as 2D vectors. More... | |
template<typename T > | |
void | std_mtx_mult (const std::vector< std::vector< T >> &A, const std::vector< std::vector< T >> &B, std::vector< std::vector< T >> &C) |
Perform matrix multiplication on two matrices 2D vectors. More... | |
Mtx class offers matrix arithmetic operations. Some methods are element-wise while others make use of grouping and unrolling.
void gpmp::linalg::Mtx::std_mtx_add | ( | const std::vector< std::vector< T >> & | A, |
const std::vector< std::vector< T >> & | B, | ||
std::vector< std::vector< T >> & | C | ||
) |
Perform matrix addition on two matrices as 2D vectors.
A | Input matrix A |
B | Input matrix B |
C | Output matrix C This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 89 of file mtx_naive.cpp.
References python.linalg::A, python.linalg::B, and python.linalg::C.
void gpmp::linalg::Mtx::std_mtx_add | ( | const std::vector< T > & | A, |
const std::vector< T > & | B, | ||
std::vector< T > & | C | ||
) |
Perform matrix addition on two matrices as flat vectors.
A | Input matrix A |
B | Input matrix B |
C | Output matrix C This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 53 of file mtx_naive.cpp.
References python.linalg::A, python.linalg::B, python.linalg::C, test_linalg::cols, and test_linalg::rows.
|
inline |
Perform matrix addition on two matrices as flat arrays.
A | Input matrix A |
B | Input matrix B |
C | Output matrix C |
rows | Number of rows |
cols | Number of columns This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 510 of file mtx.hpp.
References python.linalg::A, python.linalg::B, python.linalg::C, test_linalg::cols, and test_linalg::rows.
void gpmp::linalg::Mtx::std_mtx_mult | ( | const std::vector< std::vector< T >> & | A, |
const std::vector< std::vector< T >> & | B, | ||
std::vector< std::vector< T >> & | C | ||
) |
Perform matrix multiplication on two matrices 2D vectors.
A | Input matrix A |
B | Input matrix B |
C | Output matrix C This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 151 of file mtx_naive.cpp.
References python.linalg::A, python.linalg::B, and python.linalg::C.
|
inline |
Definition at line 540 of file mtx.hpp.
References python.linalg::A, python.linalg::B, and python.linalg::C.
void gpmp::linalg::Mtx::std_mtx_sub | ( | const std::vector< std::vector< T >> & | A, |
const std::vector< std::vector< T >> & | B, | ||
std::vector< std::vector< T >> & | C | ||
) |
Perform matrix subtraction on two matrices as 2D vectors.
A | Input matrix A |
B | Input matrix B |
C | Output matrix C This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 120 of file mtx_naive.cpp.
References python.linalg::A, python.linalg::B, and python.linalg::C.
|
inline |
Perform matrix subtraction on two matrices as flat arrays.
A | Input matrix A |
B | Input matrix B |
C | Output matrix C |
rows | Number of rows |
cols | Number of columns This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 529 of file mtx.hpp.
References python.linalg::A, python.linalg::B, python.linalg::C, test_linalg::cols, and test_linalg::rows.
|
inline |
Definition at line 558 of file mtx.hpp.
References python.linalg::A, test_linalg::cols, and test_linalg::rows.