Reference documentation for deal.II version Git 0491297983 2019-09-23 09:31:59 +0200
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Public Attributes | List of all members
MemorySpace::MemorySpaceData< Number, MemorySpace > Struct Template Reference

#include <deal.II/base/memory_space.h>

Public Member Functions

void copy_to (Number *begin, std::size_t n_elements)
 
void copy_from (Number *begin, std::size_t n_elements)
 

Public Attributes

std::unique_ptr< Number[], decltype(&std::free)> values
 
std::unique_ptr< Number[]> values_dev
 

Detailed Description

template<typename Number, typename MemorySpace>
struct MemorySpace::MemorySpaceData< Number, MemorySpace >

Data structure

Definition at line 54 of file memory_space.h.

Member Function Documentation

◆ copy_to()

template<typename Number, typename MemorySpace>
void MemorySpace::MemorySpaceData< Number, MemorySpace >::copy_to ( Number *  begin,
std::size_t  n_elements 
)
inline

Copy the active data (values for Host and values_dev for CUDA) to begin. If the data is on the device it is moved to the host.

Definition at line 68 of file memory_space.h.

◆ copy_from()

template<typename Number, typename MemorySpace>
void MemorySpace::MemorySpaceData< Number, MemorySpace >::copy_from ( Number *  begin,
std::size_t  n_elements 
)
inline

Copy the data in begin to the active data of the structure (values for Host and values_dev for CUDA). The pointer begin must be on the host.

Definition at line 79 of file memory_space.h.

Member Data Documentation

◆ values

template<typename Number, typename MemorySpace>
std::unique_ptr<Number[], decltype(&std::free)> MemorySpace::MemorySpaceData< Number, MemorySpace >::values

Pointer to data on the host.

Definition at line 88 of file memory_space.h.

◆ values_dev

template<typename Number, typename MemorySpace>
std::unique_ptr<Number[]> MemorySpace::MemorySpaceData< Number, MemorySpace >::values_dev

Pointer to data on the device.

Definition at line 93 of file memory_space.h.


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