hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
hpfem::solvers::DeviceMatrix Class Reference

#include <device_matrix.hpp>

Public Member Functions

 DeviceMatrix (const SparseMatrix &matrix)
 
 ~DeviceMatrix ()
 
 DeviceMatrix (const DeviceMatrix &)=delete
 
DeviceMatrix & operator= (const DeviceMatrix &)=delete
 
 DeviceMatrix (DeviceMatrix &&) noexcept
 
DeviceMatrix & operator= (DeviceMatrix &&) noexcept
 
Vector apply (const Vector &x) const
 \( y = A x \) (one vector: uploaded, multiplied, downloaded).
 
Matrix apply_many (const Matrix &x) const
 One product per column (one transfer for all).
 
Index rows () const noexcept
 
Index cols () const noexcept
 
::hpfem_gpu_matrix * handle () const noexcept
 Raw handle of the GPU library (for DeviceStepper; no meaning elsewhere).
 

Static Public Member Functions

static bool available () noexcept
 True if the GPU library is loaded with API version 3 or later and a device is present.
 

Constructor & Destructor Documentation

◆ DeviceMatrix() [1/3]

hpfem::solvers::DeviceMatrix::DeviceMatrix ( const SparseMatrix &  matrix)
explicit

Uploads the (compressed) CSR matrix; the host copy may be released afterwards.

Exceptions
Errorif the GPU library is not usable or lacks API version 3, or on a device error (out of memory).

◆ ~DeviceMatrix()

hpfem::solvers::DeviceMatrix::~DeviceMatrix ( )

◆ DeviceMatrix() [2/3]

hpfem::solvers::DeviceMatrix::DeviceMatrix ( const DeviceMatrix &  )
delete

◆ DeviceMatrix() [3/3]

hpfem::solvers::DeviceMatrix::DeviceMatrix ( DeviceMatrix &&  )
noexcept

Member Function Documentation

◆ apply()

Vector hpfem::solvers::DeviceMatrix::apply ( const Vector &  x) const

\( y = A x \) (one vector: uploaded, multiplied, downloaded).

◆ apply_many()

Matrix hpfem::solvers::DeviceMatrix::apply_many ( const Matrix &  x) const

One product per column (one transfer for all).

◆ available()

static bool hpfem::solvers::DeviceMatrix::available ( )
staticnoexcept

True if the GPU library is loaded with API version 3 or later and a device is present.

◆ cols()

Index hpfem::solvers::DeviceMatrix::cols ( ) const
inlinenoexcept

◆ handle()

::hpfem_gpu_matrix * hpfem::solvers::DeviceMatrix::handle ( ) const
noexcept

Raw handle of the GPU library (for DeviceStepper; no meaning elsewhere).

◆ operator=() [1/2]

DeviceMatrix & hpfem::solvers::DeviceMatrix::operator= ( const DeviceMatrix &  )
delete

◆ operator=() [2/2]

DeviceMatrix & hpfem::solvers::DeviceMatrix::operator= ( DeviceMatrix &&  )
noexcept

◆ rows()

Index hpfem::solvers::DeviceMatrix::rows ( ) const
inlinenoexcept

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