|
numerics
|
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 |
| 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 23 of file vector.hpp.
|
inline |
Definition at line 25 of file vector.hpp.
|
inlineexplicit |
Definition at line 27 of file vector.hpp.
|
inline |
Definition at line 29 of file vector.hpp.
References num::ipow().
|
inline |
Definition at line 33 of file vector.hpp.
|
inline |
Definition at line 38 of file vector.hpp.
References num::cuda::free().
|
inline |
Definition at line 44 of file vector.hpp.
References num::ipow().
|
inlinenoexcept |
Definition at line 48 of file vector.hpp.
References num::ipow().
|
inline |
Definition at line 85 of file vector.hpp.
Referenced by nbody::NBodySim::make_accel().
|
inline |
Definition at line 87 of file vector.hpp.
|
inline |
Definition at line 79 of file vector.hpp.
Referenced by num::backends::blas::axpy(), num::banded_gemv(), num::backends::blas::dot(), backends::opt::FFTPlanImpl::execute(), num::laplacian_stencil_2d_periodic(), num::backends::seq::matadd(), num::backends::blas::matvec(), num::backends::blas::norm(), and num::backends::blas::scale().
|
inline |
Definition at line 80 of file vector.hpp.
|
inline |
Definition at line 86 of file vector.hpp.
Referenced by nbody::NBodySim::make_accel().
|
inline |
Definition at line 88 of file vector.hpp.
|
inline |
Definition at line 111 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 112 of file vector.hpp.
|
inline |
Definition at line 113 of file vector.hpp.
|
inlinenoexcept |
Definition at line 63 of file vector.hpp.
References num::cuda::free(), and num::ipow().
|
inline |
Definition at line 54 of file vector.hpp.
References num::ipow().
|
inline |
Definition at line 82 of file vector.hpp.
References num::ipow().
|
inline |
Definition at line 83 of file vector.hpp.
References num::ipow().
|
inlineconstexprnoexcept |
Definition at line 77 of file vector.hpp.
Referenced by num::backends::seq::add(), num::add(), num::axpy(), num::backends::blas::axpy(), num::backends::gpu::axpy(), num::backends::omp::axpy(), num::backends::seq::axpy(), num::banded_gemv(), num::banded_solve(), backends::seq::bit_reverse(), num::cg(), tdse::TDSESolver::compute_energy(), backends::seq::cooley_tukey(), num::pde::diffusion_step_2d(), 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::quantum::expectation(), num::quantum::expectation_x(), num::quantum::expectation_y(), num::quantum::expectation_z(), backends::opt::fft(), backends::seq::fft(), num::gauss_seidel(), num::gmres(), backends::opt::ifft(), backends::seq::ifft(), num::jacobi(), num::norm(), num::backends::blas::norm(), num::backends::gpu::norm(), num::backends::seq::norm(), num::detail::normalise(), num::ode_verlet(), num::ode_yoshida4(), num::quantum::probabilities(), backends::opt::rfft(), backends::seq::rfft(), num::scale(), num::backends::blas::scale(), num::backends::gpu::scale(), num::backends::omp::scale(), num::backends::seq::scale(), num::sparse_matvec(), and num::thomas().
|
inline |
Definition at line 101 of file vector.hpp.
References num::cuda::free(), and num::cuda::to_host().
Referenced by num::cg(), and num::thomas().
|
inline |
Definition at line 92 of file vector.hpp.
References num::cuda::alloc(), and num::cuda::to_device().
Referenced by num::cg(), and num::thomas().