|
numerics
|
Dense row-major matrix with optional GPU storage. More...
#include <matrix.hpp>
Public Member Functions | |
| Matrix () | |
| Matrix (idx rows, idx cols) | |
| Matrix (idx rows, idx cols, real val) | |
| ~Matrix () | |
| Matrix (const Matrix &) | |
| Matrix (Matrix &&) noexcept | |
| Matrix & | operator= (const Matrix &) |
| Matrix & | operator= (Matrix &&) noexcept |
| constexpr idx | rows () const noexcept |
| constexpr idx | cols () const noexcept |
| constexpr idx | size () const noexcept |
| real * | data () |
| const real * | data () const |
| real & | operator() (idx i, idx j) |
| real | operator() (idx i, idx j) const |
| void | to_gpu () |
| void | to_cpu () |
| real * | gpu_data () |
| const real * | gpu_data () const |
| bool | on_gpu () const |
Dense row-major matrix with optional GPU storage.
Definition at line 12 of file matrix.hpp.
|
inline |
Definition at line 14 of file matrix.hpp.
Definition at line 22 of file matrix.cpp.
Definition at line 25 of file matrix.cpp.
References num::ipow(), and size().
| num::Matrix::~Matrix | ( | ) |
Definition at line 30 of file matrix.cpp.
References num::cuda::free().
Definition at line 34 of file matrix.cpp.
References num::ipow(), and size().
|
noexcept |
Definition at line 39 of file matrix.cpp.
References num::ipow().
Definition at line 25 of file matrix.hpp.
|
inline |
Definition at line 28 of file matrix.hpp.
Definition at line 29 of file matrix.hpp.
|
inline |
Definition at line 35 of file matrix.hpp.
Definition at line 36 of file matrix.hpp.
|
inline |
Definition at line 37 of file matrix.hpp.
Definition at line 30 of file matrix.hpp.
References num::ipow().
Definition at line 31 of file matrix.hpp.
References num::ipow().
Definition at line 45 of file matrix.cpp.
References num::ipow(), and size().
Definition at line 55 of file matrix.cpp.
References num::cuda::free(), and num::ipow().
Definition at line 24 of file matrix.hpp.
Referenced by num::lu_det(), and num::lu_inv().
Definition at line 26 of file matrix.hpp.
Referenced by Matrix(), Matrix(), operator=(), to_cpu(), and to_gpu().
| void num::Matrix::to_cpu | ( | ) |
Definition at line 75 of file matrix.cpp.
References num::cuda::free(), size(), and num::cuda::to_host().
| void num::Matrix::to_gpu | ( | ) |
Definition at line 68 of file matrix.cpp.
References num::cuda::alloc(), size(), and num::cuda::to_device().