Peano
Loading...
Searching...
No Matches
exahype2::CopyCellDataGPU< inType, outType > Struct Template Reference

Cousing to CellData which administers copies on the accelerator. More...

#include <CellData.h>

Collaboration diagram for exahype2::CopyCellDataGPU< inType, outType >:

Public Member Functions

 CopyCellDataGPU (const CellData< inType, outType > &cellData, int inputPatchSize, int outputPatchSize, int device=tarch::accelerator::Device::HostDevice, int currentPatchDevice=tarch::accelerator::Device::HostDevice)
 Construct a copy object.
 
void destroyWithoutCopy ()
 
void copyBackAndDestroy ()
 
std::string toString () const
 

Data Fields

inType * QIn
 
tarch::la::Vector< Dimensions, double > * cellCentre
 
tarch::la::Vector< Dimensions, double > * cellSize
 
double * t
 
double * dt
 
int * id
 
const int numberOfCells
 
const tarch::MemoryLocation memoryLocation
 
const int targetDevice
 
outType * QOut
 
double * maxEigenvalue
 
inType ** QInHost
 
outType ** QOutHost
 
double * maxEigenvalueHost
 
int QInStride
 
int QOutStride
 

Detailed Description

template<typename inType = double, typename outType = double>
struct exahype2::CopyCellDataGPU< inType, outType >

Cousing to CellData which administers copies on the accelerator.

This is a variant of CellData which also present GPU data. However, this flavour copies all data manually onto the GPU, whereas its parent is a proxy around data. As we copy data over, we can also rearrange all data. From a user point of view, the big difference is that we have to invoke copyBackAndDestroy() manually to eliminate the data on the device:

Copies to the device occur automatically on construction, but copies back must be triggered manually using copyBackAndDestroy().

The OpenMP implementation offers two versions, one using allocations on the device, and another that keeps data on the host. This second version requires explicit maps in the kernel, which do not currently exist. For this reason it is currently not in use.

Definition at line 187 of file CellData.h.

Constructor & Destructor Documentation

◆ CopyCellDataGPU()

template<typename inType = double, typename outType = double>
exahype2::CopyCellDataGPU< inType, outType >::CopyCellDataGPU ( const CellData< inType, outType > &  cellData,
int  inputPatchSize,
int  outputPatchSize,
int  device = tarch::accelerator::Device::HostDevice,
int  currentPatchDevice = tarch::accelerator::Device::HostDevice 
)

Construct a copy object.

Parameters
deviceValid device by handling in value greater or equal to 0 or otherwise tarch::accelerator::Device::HostDevice.

Member Function Documentation

◆ copyBackAndDestroy()

template<typename inType = double, typename outType = double>
void exahype2::CopyCellDataGPU< inType, outType >::copyBackAndDestroy ( )

◆ destroyWithoutCopy()

template<typename inType = double, typename outType = double>
void exahype2::CopyCellDataGPU< inType, outType >::destroyWithoutCopy ( )

◆ toString()

template<typename inType = double, typename outType = double>
std::string exahype2::CopyCellDataGPU< inType, outType >::toString ( ) const

Field Documentation

◆ cellCentre

template<typename inType = double, typename outType = double>
tarch::la::Vector<Dimensions,double>* exahype2::CopyCellDataGPU< inType, outType >::cellCentre

Definition at line 194 of file CellData.h.

◆ cellSize

template<typename inType = double, typename outType = double>
tarch::la::Vector<Dimensions,double>* exahype2::CopyCellDataGPU< inType, outType >::cellSize

Definition at line 195 of file CellData.h.

◆ dt

template<typename inType = double, typename outType = double>
double* exahype2::CopyCellDataGPU< inType, outType >::dt

Definition at line 197 of file CellData.h.

◆ id

◆ maxEigenvalue

template<typename inType = double, typename outType = double>
double* exahype2::CopyCellDataGPU< inType, outType >::maxEigenvalue

Definition at line 203 of file CellData.h.

◆ maxEigenvalueHost

template<typename inType = double, typename outType = double>
double* exahype2::CopyCellDataGPU< inType, outType >::maxEigenvalueHost

Definition at line 207 of file CellData.h.

◆ memoryLocation

template<typename inType = double, typename outType = double>
const tarch::MemoryLocation exahype2::CopyCellDataGPU< inType, outType >::memoryLocation

Definition at line 200 of file CellData.h.

◆ numberOfCells

template<typename inType = double, typename outType = double>
const int exahype2::CopyCellDataGPU< inType, outType >::numberOfCells

Definition at line 199 of file CellData.h.

◆ QIn

template<typename inType = double, typename outType = double>
inType* exahype2::CopyCellDataGPU< inType, outType >::QIn

Definition at line 193 of file CellData.h.

◆ QInHost

template<typename inType = double, typename outType = double>
inType** exahype2::CopyCellDataGPU< inType, outType >::QInHost

Definition at line 205 of file CellData.h.

◆ QInStride

template<typename inType = double, typename outType = double>
int exahype2::CopyCellDataGPU< inType, outType >::QInStride

Definition at line 227 of file CellData.h.

◆ QOut

template<typename inType = double, typename outType = double>
outType* exahype2::CopyCellDataGPU< inType, outType >::QOut

Definition at line 202 of file CellData.h.

◆ QOutHost

template<typename inType = double, typename outType = double>
outType** exahype2::CopyCellDataGPU< inType, outType >::QOutHost

Definition at line 206 of file CellData.h.

◆ QOutStride

template<typename inType = double, typename outType = double>
int exahype2::CopyCellDataGPU< inType, outType >::QOutStride

Definition at line 228 of file CellData.h.

◆ t

template<typename inType = double, typename outType = double>
double* exahype2::CopyCellDataGPU< inType, outType >::t

Definition at line 196 of file CellData.h.

◆ targetDevice

template<typename inType = double, typename outType = double>
const int exahype2::CopyCellDataGPU< inType, outType >::targetDevice

Definition at line 201 of file CellData.h.


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