High Performance Plasticity  0.5.0
hpp::SpectralDatabaseCUDA< T, N > Class Template Reference

#include <spectralUtilsCUDA.h>

Public Member Functions

 SpectralDatabaseCUDA ()
 
 SpectralDatabaseCUDA (const SpectralDatabase< T > &dbIn, const std::vector< SpectralDatasetID > &dsetIDs)
 
__device__ T getIDFTRealD (unsigned int dsetIdx, unsigned int *spatialCoord) const
 
__device__ T getIDFTRealDShared (unsigned int dsetIdx, unsigned int *spatialCoord, unsigned int nShared, SpectralCoordCUDA< N > *sharedCoords, SpectralCoeffCUDA< T > *sharedCoeffs) const
 Device IDFTD. More...
 
getIDFTRealH (unsigned int dsetIdx, std::vector< unsigned int > spatialCoord) const
 
__device__ T * getGridStarts ()
 
__device__ T * getGridSteps ()
 
__device__ unsigned int * getGridDims ()
 
unsigned int getNDsets () const
 
unsigned int getNTermsTypical () const
 

Private Attributes

unsigned int * gridDims
 
std::shared_ptr< unsigned int > gridDimsSharedPtr
 
T * gridStarts
 
std::shared_ptr< T > gridStartsSharedPtr
 
T * gridSteps
 
std::shared_ptr< T > gridStepsSharedPtr
 
unsigned int nDsets
 
unsigned int nTermsTypical
 
SpectralDatasetCUDA< T, N > * dsets
 
std::shared_ptr< SpectralDatasetCUDA< T, N > > dsetsSharedPtr
 
std::vector< std::shared_ptr< SpectralCoordCUDA< N > > > coordSharedPtrs
 
std::vector< std::shared_ptr< SpectralCoeffCUDA< T > > > coeffSharedPtrs
 

Detailed Description

template<typename T, unsigned int N>
class hpp::SpectralDatabaseCUDA< T, N >

Author
Michael Malahe
Date
04/04/17

Constructor & Destructor Documentation

template<typename T, unsigned int N>
hpp::SpectralDatabaseCUDA< T, N >::SpectralDatabaseCUDA ( )
template<typename T, unsigned int N>
hpp::SpectralDatabaseCUDA< T, N >::SpectralDatabaseCUDA ( const SpectralDatabase< T > &  dbIn,
const std::vector< SpectralDatasetID > &  dsetIDs 
)

Member Function Documentation

template<typename T, unsigned int N>
__device__ unsigned int* hpp::SpectralDatabaseCUDA< T, N >::getGridDims ( )
inline
template<typename T, unsigned int N>
__device__ T* hpp::SpectralDatabaseCUDA< T, N >::getGridStarts ( )
inline
template<typename T, unsigned int N>
__device__ T* hpp::SpectralDatabaseCUDA< T, N >::getGridSteps ( )
inline
template<typename T , unsigned int N>
__device__ T hpp::SpectralDatabaseCUDA< T, N >::getIDFTRealD ( unsigned int  dsetIdx,
unsigned int *  spatialCoord 
) const
template<typename T, unsigned int N>
__device__ T hpp::SpectralDatabaseCUDA< T, N >::getIDFTRealDShared ( unsigned int  dsetIdx,
unsigned int *  spatialCoord,
unsigned int  nShared,
SpectralCoordCUDA< N > *  sharedCoords,
SpectralCoeffCUDA< T > *  sharedCoeffs 
) const

Device IDFTD.

The grid dimension must be a power of two. For performance reasons this is not checked in this function. The particular optimisation is to replace the modulo in the range reduction step with the following bitwise operation trick for powers of two. Suppose we want yx, and x is a power of two: \(x = 2^z\). The binary representation of x has the digit 1 in the z position and zeroes elsewhere. Now \( x - 1 = 2^z - 1 \) has a 0 in the z position and a 1 in every lower bit. If we then take y&(x-1), all of the bits of y above and including the z position represent values that are divisible by x, and are accordingly zeroed in the result. All of the bits below the z position are left intact (being bitwise & with all 1's), leaving us with the remainder.

Parameters
dsetIdx
spatialCoord
nShared
sharedCoords
sharedCoeffs
template<typename T, unsigned int N>
T hpp::SpectralDatabaseCUDA< T, N >::getIDFTRealH ( unsigned int  dsetIdx,
std::vector< unsigned int >  spatialCoord 
) const
template<typename T, unsigned int N>
unsigned int hpp::SpectralDatabaseCUDA< T, N >::getNDsets ( ) const
inline
template<typename T, unsigned int N>
unsigned int hpp::SpectralDatabaseCUDA< T, N >::getNTermsTypical ( ) const
inline

Member Data Documentation

template<typename T, unsigned int N>
std::vector<std::shared_ptr<SpectralCoeffCUDA<T> > > hpp::SpectralDatabaseCUDA< T, N >::coeffSharedPtrs
private
template<typename T, unsigned int N>
std::vector<std::shared_ptr<SpectralCoordCUDA<N> > > hpp::SpectralDatabaseCUDA< T, N >::coordSharedPtrs
private
template<typename T, unsigned int N>
SpectralDatasetCUDA<T,N>* hpp::SpectralDatabaseCUDA< T, N >::dsets
private
template<typename T, unsigned int N>
std::shared_ptr<SpectralDatasetCUDA<T,N> > hpp::SpectralDatabaseCUDA< T, N >::dsetsSharedPtr
private
template<typename T, unsigned int N>
unsigned int* hpp::SpectralDatabaseCUDA< T, N >::gridDims
private
template<typename T, unsigned int N>
std::shared_ptr<unsigned int> hpp::SpectralDatabaseCUDA< T, N >::gridDimsSharedPtr
private
template<typename T, unsigned int N>
T* hpp::SpectralDatabaseCUDA< T, N >::gridStarts
private
template<typename T, unsigned int N>
std::shared_ptr<T> hpp::SpectralDatabaseCUDA< T, N >::gridStartsSharedPtr
private
template<typename T, unsigned int N>
T* hpp::SpectralDatabaseCUDA< T, N >::gridSteps
private
template<typename T, unsigned int N>
std::shared_ptr<T> hpp::SpectralDatabaseCUDA< T, N >::gridStepsSharedPtr
private
template<typename T, unsigned int N>
unsigned int hpp::SpectralDatabaseCUDA< T, N >::nDsets
private
template<typename T, unsigned int N>
unsigned int hpp::SpectralDatabaseCUDA< T, N >::nTermsTypical
private

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