SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sirius::wf::device_memory_guard Class Reference

Helper class to allocate and copy wave-functions to/from device. More...

#include <wave_functions.hpp>

Public Member Functions

template<typename T >
 device_memory_guard (T const &obj__, sddk::memory_t mem__, copy_to copy_to__)
 
 device_memory_guard (device_memory_guard &&src__)
 
device_memory_guardoperator= (device_memory_guard &&src__)
 

Private Member Functions

 device_memory_guard (device_memory_guard const &)=delete
 
device_memory_guardoperator= (device_memory_guard const &)=delete
 

Private Attributes

void * obj_ {nullptr}
 
sddk::memory_t mem_ {sddk::memory_t::host}
 
copy_to copy_to_ {wf::copy_to::none}
 
std::function< void(void *, sddk::memory_t, wf::copy_to)> handler_
 

Detailed Description

Helper class to allocate and copy wave-functions to/from device.

Definition at line 231 of file wave_functions.hpp.

Constructor & Destructor Documentation

◆ device_memory_guard() [1/3]

sirius::wf::device_memory_guard::device_memory_guard ( )
inline

Definition at line 242 of file wave_functions.hpp.

◆ device_memory_guard() [2/3]

template<typename T >
sirius::wf::device_memory_guard::device_memory_guard ( T const &  obj__,
sddk::memory_t  mem__,
copy_to  copy_to__ 
)
inline

Definition at line 247 of file wave_functions.hpp.

◆ device_memory_guard() [3/3]

sirius::wf::device_memory_guard::device_memory_guard ( device_memory_guard &&  src__)
inline

Definition at line 272 of file wave_functions.hpp.

◆ ~device_memory_guard()

sirius::wf::device_memory_guard::~device_memory_guard ( )
inline

Definition at line 292 of file wave_functions.hpp.

Member Function Documentation

◆ operator=()

device_memory_guard & sirius::wf::device_memory_guard::operator= ( device_memory_guard &&  src__)
inline

Definition at line 280 of file wave_functions.hpp.

Member Data Documentation

◆ obj_

void* sirius::wf::device_memory_guard::obj_ {nullptr}
private

Definition at line 234 of file wave_functions.hpp.

◆ mem_

sddk::memory_t sirius::wf::device_memory_guard::mem_ {sddk::memory_t::host}
private

Definition at line 235 of file wave_functions.hpp.

◆ copy_to_

copy_to sirius::wf::device_memory_guard::copy_to_ {wf::copy_to::none}
private

Definition at line 236 of file wave_functions.hpp.

◆ handler_

std::function<void(void*, sddk::memory_t, wf::copy_to)> sirius::wf::device_memory_guard::handler_
private

Definition at line 237 of file wave_functions.hpp.


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