|
numerics 0.1.0
|
Dense vector with optional GPU storage, templated over scalar type T. More...
#include <vector.hpp>
Public Member Functions | |
| BasicVector () | |
| BasicVector (idx n) | |
| BasicVector (idx n, T val) | |
| BasicVector (std::initializer_list< T > init) | |
| ~BasicVector () | |
| BasicVector (const BasicVector &o) | |
| BasicVector (BasicVector &&o) noexcept | |
| BasicVector & | operator= (const BasicVector &o) |
| BasicVector & | operator= (BasicVector &&o) noexcept |
| constexpr idx | size () const noexcept |
| BasicVector & | vec () |
| Satisfy the VecField concept: a Vector is its own underlying vector. | |
| const BasicVector & | vec () const |
| T * | data () |
| const T * | data () const |
| T & | operator[] (idx i) |
| T | operator[] (idx i) const |
| T * | begin () |
| T * | end () |
| const T * | begin () const |
| const T * | end () const |
| void | to_gpu () |
| void | to_cpu () |
| real * | gpu_data () |
| const real * | gpu_data () const |
| bool | on_gpu () const |
Dense vector with optional GPU storage, templated over scalar type T.
Typical aliases:
num::Vector = BasicVector<real> – real-valued, full backend dispatch including GPUnum::CVector = BasicVector<cplx> – complex-valued, sequential only (no GPU)All member functions are defined inline so the template is usable across translation units without explicit instantiation.
Definition at line 24 of file vector.hpp.
|
inline |
Definition at line 26 of file vector.hpp.
|
inlineexplicit |
Definition at line 28 of file vector.hpp.
|
inline |
Definition at line 30 of file vector.hpp.
|
inline |
Definition at line 34 of file vector.hpp.
|
inline |
Definition at line 39 of file vector.hpp.
References num::cuda::free().
|
inline |
Definition at line 46 of file vector.hpp.
|
inlinenoexcept |
Definition at line 50 of file vector.hpp.
|
inline |
Definition at line 92 of file vector.hpp.
|
inline |
Definition at line 94 of file vector.hpp.
|
inline |
Definition at line 86 of file vector.hpp.
Referenced by num::kernel::array::axpby(), num::kernel::array::axpbyz(), num::backends::blas::axpy(), num::banded_gemv(), num::banded_lu_solve(), num::ScalarField2D::data(), num::ScalarField2D::data(), num::backends::blas::dot(), num::backends::lapack::eig_sym(), backends::opt::FFTPlanImpl::execute(), num::kernel::dense::ger(), num::kernel::reduce::l1_norm(), num::laplacian_stencil_2d_periodic(), num::kernel::reduce::linf_norm(), num::kernel::array::map(), num::kernel::array::map(), num::backends::blas::matvec(), num::kernel::subspace::mgs_orthogonalize(), num::backends::blas::norm(), num::kernel::array::reduce(), num::backends::blas::scale(), num::kernel::reduce::sum(), num::backends::lapack::svd(), num::backends::lapack::thomas(), num::kernel::dense::trsv_lower(), and num::kernel::dense::trsv_upper().
|
inline |
Definition at line 87 of file vector.hpp.
|
inline |
Definition at line 93 of file vector.hpp.
|
inline |
Definition at line 95 of file vector.hpp.
|
inline |
Definition at line 118 of file vector.hpp.
Referenced by num::add(), num::backends::gpu::axpy(), num::backends::gpu::dot(), num::backends::gpu::matvec(), num::backends::gpu::norm(), num::backends::gpu::scale(), and num::thomas().
|
inline |
Definition at line 119 of file vector.hpp.
|
inline |
Definition at line 120 of file vector.hpp.
|
inlinenoexcept |
Definition at line 65 of file vector.hpp.
References num::cuda::free().
|
inline |
Definition at line 56 of file vector.hpp.
|
inline |
Definition at line 89 of file vector.hpp.
|
inline |
Definition at line 90 of file vector.hpp.
|
inlineconstexprnoexcept |
Definition at line 80 of file vector.hpp.
Referenced by num::backends::seq::add(), num::add(), num::kernel::subspace::DenseOp::apply(), num::kernel::subspace::SparseOp::apply(), num::kernel::subspace::CallableOp< F >::apply(), num::kernel::array::axpby(), num::kernel::array::axpbyz(), num::axpy(), num::backends::blas::axpy(), num::backends::gpu::axpy(), num::backends::omp::axpy(), num::backends::seq::axpy(), num::banded_gemv(), num::banded_lu_solve(), num::banded_solve(), backends::seq::bit_reverse(), num::cg(), num::cg_matfree(), backends::seq::cooley_tukey(), num::pde::diffusion_step_2d(), num::pde::diffusion_step_2d_4th_dirichlet(), num::pde::diffusion_step_2d_dirichlet(), num::dot(), num::backends::blas::dot(), num::backends::gpu::dot(), num::backends::omp::dot(), num::backends::seq::dot(), num::spectral::FFTPlan::execute(), num::spectral::fft(), backends::opt::fft(), backends::seq::fft(), num::gauss_seidel(), num::kernel::dense::ger(), num::gmres(), num::spectral::ifft(), backends::opt::ifft(), backends::seq::ifft(), num::spectral::irfft(), num::jacobi(), num::kernel::reduce::l1_norm(), num::kernel::reduce::linf_norm(), num::kernel::array::map(), num::kernel::array::map(), num::norm(), num::backends::blas::norm(), num::backends::gpu::norm(), num::backends::seq::norm(), num::detail::normalise(), num::rayleigh_iteration(), num::kernel::array::reduce(), backends::opt::rfft(), backends::seq::rfft(), num::spectral::rfft(), num::scale(), num::backends::blas::scale(), num::backends::gpu::scale(), num::backends::omp::scale(), num::backends::seq::scale(), num::ScalarField2D::size(), num::Vec2View::size(), num::Vec2ConstView::size(), num::sparse_matvec(), num::kernel::reduce::sum(), num::backends::lapack::thomas(), num::backends::seq::thomas(), num::thomas(), num::kernel::dense::trsv_lower(), num::kernel::dense::trsv_upper(), and num::kernel::array::zip_map().
|
inline |
Definition at line 108 of file vector.hpp.
References num::cuda::free(), and num::cuda::to_host().
Referenced by num::cg(), and num::thomas().
|
inline |
Definition at line 99 of file vector.hpp.
References num::cuda::alloc(), and num::cuda::to_device().
Referenced by num::cg(), and num::thomas().
|
inline |
Satisfy the VecField concept: a Vector is its own underlying vector.
Definition at line 83 of file vector.hpp.
Referenced by num::ode::advance(), and num::ode::advance().
|
inline |
Definition at line 84 of file vector.hpp.