numerics 0.1.0
Loading...
Searching...
No Matches
num::BandedMatrix Class Reference

LAPACK-style band storage. More...

#include <banded.hpp>

Public Member Functions

 BandedMatrix (idx n, idx kl, idx ku)
 
 BandedMatrix (idx n, idx kl, idx ku, real val)
 
 ~BandedMatrix ()
 
 BandedMatrix (const BandedMatrix &)
 
 BandedMatrix (BandedMatrix &&) noexcept
 
BandedMatrixoperator= (const BandedMatrix &)
 
BandedMatrixoperator= (BandedMatrix &&) noexcept
 
idx size () const
 
idx rows () const
 
idx cols () const
 
idx kl () const
 
idx ku () const
 
idx bandwidth () const
 
idx ldab () const
 
realoperator() (idx i, idx j)
 
real operator() (idx i, idx j) const
 
realband (idx band_row, idx col)
 
real band (idx band_row, idx col) const
 
realdata ()
 
const realdata () const
 
bool in_band (idx i, idx j) const
 
void to_gpu ()
 
void to_cpu ()
 
realgpu_data ()
 
const realgpu_data () const
 
bool on_gpu () const
 

Detailed Description

LAPACK-style band storage.

Stores \(A_{ij}\) at \(\text{band}(k_l+k_u+i-j,j)\) when \(\max(0,j-k_u)\le i\le \min(n-1,j+k_l)\).

Definition at line 16 of file banded.hpp.

Constructor & Destructor Documentation

◆ BandedMatrix() [1/4]

num::BandedMatrix::BandedMatrix ( idx  n,
idx  kl,
idx  ku 
)

Definition at line 20 of file banded.cpp.

◆ BandedMatrix() [2/4]

num::BandedMatrix::BandedMatrix ( idx  n,
idx  kl,
idx  ku,
real  val 
)

Definition at line 30 of file banded.cpp.

◆ ~BandedMatrix()

num::BandedMatrix::~BandedMatrix ( )

Definition at line 35 of file banded.cpp.

References num::cuda::free().

◆ BandedMatrix() [3/4]

num::BandedMatrix::BandedMatrix ( const BandedMatrix other)

Definition at line 42 of file banded.cpp.

◆ BandedMatrix() [4/4]

num::BandedMatrix::BandedMatrix ( BandedMatrix &&  other)
noexcept

Definition at line 51 of file banded.cpp.

Member Function Documentation

◆ band() [1/2]

real & num::BandedMatrix::band ( idx  band_row,
idx  col 
)

Definition at line 106 of file banded.cpp.

◆ band() [2/2]

real num::BandedMatrix::band ( idx  band_row,
idx  col 
) const

Definition at line 110 of file banded.cpp.

◆ bandwidth()

idx num::BandedMatrix::bandwidth ( ) const
inline

Definition at line 37 of file banded.hpp.

◆ cols()

idx num::BandedMatrix::cols ( ) const
inline

Definition at line 31 of file banded.hpp.

◆ data() [1/2]

real * num::BandedMatrix::data ( )
inline

◆ data() [2/2]

const real * num::BandedMatrix::data ( ) const
inline

Definition at line 48 of file banded.hpp.

◆ gpu_data() [1/2]

real * num::BandedMatrix::gpu_data ( )
inline

Definition at line 54 of file banded.hpp.

◆ gpu_data() [2/2]

const real * num::BandedMatrix::gpu_data ( ) const
inline

Definition at line 55 of file banded.hpp.

◆ in_band()

bool num::BandedMatrix::in_band ( idx  i,
idx  j 
) const

Definition at line 114 of file banded.cpp.

◆ kl()

idx num::BandedMatrix::kl ( ) const
inline

◆ ku()

idx num::BandedMatrix::ku ( ) const
inline

◆ ldab()

idx num::BandedMatrix::ldab ( ) const
inline

◆ on_gpu()

bool num::BandedMatrix::on_gpu ( ) const
inline

Definition at line 56 of file banded.hpp.

◆ operator()() [1/2]

real & num::BandedMatrix::operator() ( idx  i,
idx  j 
)

Definition at line 98 of file banded.cpp.

◆ operator()() [2/2]

real num::BandedMatrix::operator() ( idx  i,
idx  j 
) const

Definition at line 102 of file banded.cpp.

◆ operator=() [1/2]

BandedMatrix & num::BandedMatrix::operator= ( BandedMatrix &&  other)
noexcept

Definition at line 80 of file banded.cpp.

References num::cuda::free().

◆ operator=() [2/2]

BandedMatrix & num::BandedMatrix::operator= ( const BandedMatrix other)

Definition at line 62 of file banded.cpp.

References num::cuda::free().

◆ rows()

idx num::BandedMatrix::rows ( ) const
inline

Definition at line 30 of file banded.hpp.

◆ size()

idx num::BandedMatrix::size ( ) const
inline

◆ to_cpu()

void num::BandedMatrix::to_cpu ( )

Definition at line 126 of file banded.cpp.

References num::cuda::to_host().

◆ to_gpu()

void num::BandedMatrix::to_gpu ( )

Definition at line 118 of file banded.cpp.

References num::cuda::alloc(), and num::cuda::to_device().


The documentation for this class was generated from the following files: