![]() |
Project
|
#include <SplineSpec.h>
Inherits o2::gpu::FlatObject.
Inherited by o2::gpu::SplineSpec< DataT, XdimT, YdimT, 0 >.
Public Types | |
typedef Spline1D< DataT >::SafetyLevel | SafetyLevel |
typedef Spline1D< DataT >::Knot | Knot |
Public Member Functions | |
GPUd () static const expr int32_t getVersion() | |
_____________ Version control __________________________ | |
SplineContainer ()=default | |
_____________ C++ constructors / destructors __________________________ | |
SplineContainer (const SplineContainer &)=delete | |
Disable all other constructors. | |
~SplineContainer ()=default | |
Destructor. | |
void | approximateFunction (const double xMin[], const double xMax[], std::function< void(const double x[], double f[])> F, const int32_t nAuxiliaryDataPoints[]=nullptr) |
_______________ Construction interface ________________________ | |
int32_t | writeToFile (TFile &outf, const char *name) |
_______________ IO ________________________ | |
GPUd () int32_t getXdimensions() const | |
_______________ Getters ________________________ | |
GPUd () int32_t getYdimensions() const | |
Get number of Y dimensions. | |
GPUd () static const expr size_t getParameterAlignmentBytes() | |
Get minimal required alignment for the spline parameters. | |
GPUd () int32_t getNumberOfParameters() const | |
Number of parameters. | |
GPUd () size_t getSizeOfParameters() const | |
Size of the parameter array in bytes. | |
GPUd () int32_t getNumberOfKnots() const | |
Get a number of knots. | |
GPUd () int32_t getNumberOfParametersPerKnot() const | |
Number of parameters per knot. | |
GPUd () const Spline1D< DataT > &getGrid(int32_t dimX) const | |
Get 1-D grid for dimX dimension. | |
GPUd () void getKnotU(int32_t iKnot | |
Get u[] coordinate of i-th knot. | |
GPUd () int32_t getKnotIndex(const int32_t iKnot[]) const | |
Get index of a knot (iKnot1,iKnot2,..,iKnotN) | |
GPUd () DataT *getParameters() | |
Get spline parameters. | |
GPUd () const DataT *getParameters() const | |
Get spline parameters const. | |
GPUd () size_t getGridOffset(int32_t dimX) const | |
_______________ Technical stuff ________________________ | |
GPUd () void setXrange(const DataT xMin[] | |
Set X range. | |
void | print () const |
Print method. | |
GPUd () int32_t calcNumberOfParameters(int32_t nYdim) const | |
_______________ Expert tools _______________ | |
GPUd () int32_t calcNumberOfParametersPerKnot(int32_t nYdim) const | |
Number of parameters per knot. | |
void | cloneFromObject (const SplineContainer &obj, char *newFlatBufferPtr) |
void | moveBufferTo (char *newBufferPtr) |
void | destroy () |
void | setActualBufferAddress (char *actualFlatBufferPtr) |
void | setFutureBufferAddress (char *futureFlatBufferPtr) |
char * | releaseInternalBuffer () |
_____________ Methods for making the data buffer external __________________________ | |
![]() | |
FlatObject ()=default | |
_____________ Constructors / destructors __________________________ | |
~FlatObject () | |
FlatObject (const FlatObject &)=delete | |
FlatObject & | operator= (const FlatObject &)=delete |
void | destroy () |
_______________ Utilities _______________________________________________ | |
size_t | getFlatBufferSize () const |
Gives size of the flat buffer. | |
const char * | getFlatBufferPtr () const |
Gives pointer to the flat buffer. | |
bool | isConstructed () const |
Tells if the object is constructed. | |
bool | isBufferInternal () const |
Tells if the buffer is internal. | |
void | adoptInternalBuffer (char *buf) |
void | clearInternalBufferPtr () |
void | printC () const |
Print the content of the flat buffer. | |
Static Public Member Functions | |
static SplineContainer * | readFromFile (TFile &inpf, const char *name) |
read a class object from the file | |
static int32_t | test (const bool draw=0, const bool drawDataPoints=1) |
_______________ Test tools _______________ | |
static constexpr size_t | getBufferAlignmentBytes () |
_____________ FlatObject functionality, see FlatObject class for description ____________ | |
static constexpr size_t | getClassAlignmentBytes () |
_____________ Memory alignment __________________________ | |
![]() | |
static size_t | alignSize (size_t sizeBytes, size_t alignmentBytes) |
_______________ Generic utilities _______________________________________________ | |
template<class T > | |
static T * | relocatePointer (const char *oldBase, char *newBase, const T *ptr) |
Relocates a pointer inside a buffer to the new buffer address. | |
template<class T , class TFile > | |
static int32_t | writeToFile (T &obj, TFile &outf, const char *name) |
write a child class object to the file | |
template<class T , class TFile > | |
static T * | readFromFile (TFile &inpf, const char *name) |
read a child class object from the file | |
template<class T > | |
static std::string | stressTest (T &obj) |
Test the flat object functionality for a child class T. | |
Public Attributes | |
int32_t u[] | const |
const DataT | xMax [] |
Protected Member Functions | |
void | recreate (int32_t nXdim, int32_t nYdim, const int32_t nKnots[]) |
Constructor for a regular spline. | |
void | recreate (int32_t nXdim, int32_t nYdim, const int32_t nKnots[], const int32_t *const knotU[]) |
Constructor for an irregular spline. | |
ClassDefNV (SplineContainer, 1) | |
(transient!!) F-dependent parameters of the spline | |
![]() | |
void | startConstruction () |
_____________ Construction _________ | |
void | finishConstruction (int32_t flatBufferSize) |
void | cloneFromObject (const FlatObject &obj, char *newFlatBufferPtr) |
char * | releaseInternalBuffer () |
_____________ Methods for making the data buffer external __________________________ | |
void | moveBufferTo (char *newBufferPtr) |
void | setActualBufferAddress (char *actualFlatBufferPtr) |
_____________ Methods for moving the class with its external buffer to another location __________________________ | |
void | setFutureBufferAddress (char *futureFlatBufferPtr) |
ClassDefNV (FlatObject, 1) | |
Pointer to the flat buffer. | |
Protected Attributes | |
int32_t | mXdim = 0 |
_____________ Data members ____________ | |
int32_t | mYdim = 0 |
dimentionality of Y | |
int32_t | mNknots = 0 |
number of spline knots | |
Spline1D< DataT > * | mGrid |
DataT * | mParameters |
(transient!!) mXdim grids | |
![]() | |
int32_t | mFlatBufferSize = 0 |
size of the flat buffer | |
uint32_t | mConstructionMask = ConstructionState::NotConstructed |
mask for constructed object members, first two bytes are used by this class | |
char * | mFlatBufferContainer = nullptr |
char * | mFlatBufferPtr = nullptr |
Additional Inherited Members | |
![]() | |
enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
GPUCA_GPUCODE. More... | |
![]() | |
static constexpr size_t | getClassAlignmentBytes () |
_____________ Memory alignment __________________________ | |
static constexpr size_t | getBufferAlignmentBytes () |
Gives minimal alignment in bytes required for the flat buffer. | |
================================================================================================== The class SplineContainer is a base Spline class. It contains all the class members and those methods which only depends on the DataT data type. It also contains all non-inlined methods with the implementation in SplineSpec.cxx file.
DataT is a data type, which is supposed to be either double or float. For other possible data types one has to add the corresponding instantiation line at the end of the SplineSpec.cxx file
Definition at line 47 of file SplineSpec.h.
typedef Spline1D<DataT>::Knot o2::gpu::SplineContainer< DataT >::Knot |
Definition at line 51 of file SplineSpec.h.
typedef Spline1D<DataT>::SafetyLevel o2::gpu::SplineContainer< DataT >::SafetyLevel |
Definition at line 50 of file SplineSpec.h.
|
default |
_____________ C++ constructors / destructors __________________________
Default constructor
|
delete |
Disable all other constructors.
|
default |
Destructor.
void SplineContainer::approximateFunction | ( | const double | xMin[], |
const double | xMax[], | ||
std::function< void(const double x[], double f[])> | F, | ||
const int32_t | nAuxiliaryDataPoints[] = nullptr |
||
) |
_______________ Construction interface ________________________
approximate a function F with this spline
approximate a function F with this spline
Definition at line 199 of file SplineSpec.cxx.
|
protected |
(transient!!) F-dependent parameters of the spline
void SplineContainer::cloneFromObject | ( | const SplineContainer< DataT > & | obj, |
char * | newFlatBufferPtr | ||
) |
See FlatObject for description
Definition at line 100 of file SplineSpec.cxx.
void SplineContainer::destroy | ( | ) |
See FlatObject for description
Definition at line 46 of file SplineSpec.cxx.
|
inlinestaticconstexpr |
_____________ FlatObject functionality, see FlatObject class for description ____________
Definition at line 197 of file FlatObject.h.
|
inlinestaticconstexpr |
_____________ Memory alignment __________________________
Gives minimal alignment in bytes required for the class object
Definition at line 194 of file FlatObject.h.
|
inline |
Get spline parameters const.
Definition at line 124 of file SplineSpec.h.
|
inline |
Get 1-D grid for dimX dimension.
Definition at line 112 of file SplineSpec.h.
|
inline |
Get spline parameters.
Definition at line 121 of file SplineSpec.h.
|
inline |
_______________ Expert tools _______________
Number of parameters for given Y dimensions
Definition at line 140 of file SplineSpec.h.
|
inline |
Number of parameters per knot.
Definition at line 146 of file SplineSpec.h.
o2::gpu::SplineContainer< DataT >::GPUd | ( | ) | const |
Get index of a knot (iKnot1,iKnot2,..,iKnotN)
|
inline |
Get a number of knots.
Definition at line 106 of file SplineSpec.h.
|
inline |
Number of parameters.
Definition at line 100 of file SplineSpec.h.
|
inline |
Number of parameters per knot.
Definition at line 109 of file SplineSpec.h.
|
inline |
_______________ Getters ________________________
Get number of X dimensions
Definition at line 91 of file SplineSpec.h.
|
inline |
Get number of Y dimensions.
Definition at line 94 of file SplineSpec.h.
|
inline |
_______________ Technical stuff ________________________
Get offset of Grid[dimX] flat data in the flat buffer
Definition at line 129 of file SplineSpec.h.
|
inline |
Size of the parameter array in bytes.
Definition at line 103 of file SplineSpec.h.
|
inline |
_____________ Version control __________________________
Version control
Definition at line 56 of file SplineSpec.h.
|
inline |
Get minimal required alignment for the spline parameters.
Definition at line 97 of file SplineSpec.h.
o2::gpu::SplineContainer< DataT >::GPUd | ( | ) |
Get u[] coordinate of i-th knot.
o2::gpu::SplineContainer< DataT >::GPUd | ( | ) | const |
Set X range.
See FlatObject for description
Definition at line 120 of file SplineSpec.cxx.
void SplineContainer::print | ( | ) | const |
Print method.
Definition at line 88 of file SplineSpec.cxx.
|
static |
read a class object from the file
read a class object from the file
Definition at line 217 of file SplineSpec.cxx.
|
protected |
Constructor for a regular spline.
Constructor for a regular spline
Definition at line 187 of file SplineSpec.cxx.
|
protected |
Constructor for an irregular spline.
Constructor for an irregular spline
Definition at line 131 of file SplineSpec.cxx.
|
inline |
_____________ Methods for making the data buffer external __________________________
Definition at line 220 of file FlatObject.h.
void SplineContainer::setActualBufferAddress | ( | char * | actualFlatBufferPtr | ) |
See FlatObject for description
Definition at line 58 of file SplineSpec.cxx.
void SplineContainer::setFutureBufferAddress | ( | char * | futureFlatBufferPtr | ) |
See FlatObject for description
Definition at line 75 of file SplineSpec.cxx.
|
static |
_______________ Test tools _______________
Test the class functionality
Definition at line 225 of file SplineSpec.cxx.
_______________ IO ________________________
write a class object to the file
write a class object to the file
Definition at line 210 of file SplineSpec.cxx.
int32_t u [] o2::gpu::SplineContainer< DataT >::const |
Definition at line 115 of file SplineSpec.h.
|
protected |
Definition at line 189 of file SplineSpec.h.
|
protected |
number of spline knots
Definition at line 187 of file SplineSpec.h.
|
protected |
(transient!!) mXdim grids
Definition at line 190 of file SplineSpec.h.
|
protected |
_____________ Data members ____________
dimentionality of X
Definition at line 185 of file SplineSpec.h.
|
protected |
dimentionality of Y
Definition at line 186 of file SplineSpec.h.
const DataT o2::gpu::SplineContainer< DataT >::xMax[] |
Definition at line 132 of file SplineSpec.h.