![]() |
Project
|
#include <Spline1DSpec.h>
Inherits o2::gpu::Spline1DContainerBase< DataT, FlatObject >.
Public Member Functions | |
| GPUd () const int32_t *getUtoKnotMap() const | |
| Get a map (integer U -> corresponding knot index) | |
| GPUd () const Knot< DataT > *getKnots() const | |
| Get the array of knots. | |
| template<SafetyLevel SafeT = SafetyLevel::kSafe> | |
| GPUd () const Knot< DataT > &getKnot(int32_t i) const | |
| Get i-th knot. | |
| template<SafetyLevel SafeT = SafetyLevel::kSafe> | |
| GPUd () int32_t getLeftKnotIndexForU(DataT u) const | |
| Get index of an associated knot for a given U coordinate. Performs a boundary check. | |
| GPUd () DataT *getParameters() | |
| Get spline parameters. | |
| GPUd () const DataT *getParameters() const | |
| Get spline parameters const. | |
| void | approximateFunction (double xMin, double xMax, std::function< void(double x, double f[])> F, int32_t nAuxiliaryDataPoints=4) |
| approximate a function F with this spline | |
| int32_t | writeToFile (TFile &outf, const char *name) |
| write a class object to the file | |
| void | print () const |
| Print method. | |
| void | cloneFromObject (const Spline1DContainer &obj, char *newFlatBufferPtr) |
| void | moveBufferTo (char *newBufferPtr) |
| template<class OtherFlatBase > | |
| void | importFrom (const Spline1DContainerBase< DataT, OtherFlatBase > &src) |
| void | destroy () |
| void | setActualBufferAddress (char *actualFlatBufferPtr) |
| void | setFutureBufferAddress (char *futureFlatBufferPtr) |
Public Member Functions inherited from o2::gpu::Spline1DContainerBase< DataT, FlatObject > | |
| GPUd () static const expr int32_t getVersion() | |
| _____________ Version control __________________________ | |
| GPUd () int32_t getUmax() const | |
| _______________ Getters ________________________ | |
| GPUd () int32_t getYdimensions() const | |
| Get number of Y dimensions. | |
| GPUd () size_t getParameterAlignmentBytes() const | |
| 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 () DataT convXtoU(DataT x) const | |
| _______________ Technical stuff ________________________ | |
| GPUd () DataT convUtoX(DataT u) const | |
| Convert U coordinate to X. | |
| GPUd () DataT getXmin() const | |
| Get Xmin. | |
| GPUd () DataT getXmax() const | |
| Get Xmax. | |
| GPUd () DataT getXtoUscale() const | |
| Get XtoUscale. | |
| GPUd () void setXrange(DataT xMin | |
| Set X range. | |
| GPUd () int32_t calcNumberOfParameters(int32_t nYdim) const | |
| _______________ Expert tools _______________ | |
| Spline1DContainerBase ()=default | |
| _____________ C++ constructors / destructors __________________________ | |
| Spline1DContainerBase (const Spline1DContainerBase &)=delete | |
| Disable all other constructors. | |
| ~Spline1DContainerBase ()=default | |
| Destructor. | |
Public Member Functions inherited from o2::gpu::FlatObject | |
| FlatObject ()=default | |
| _____________ Constructors / destructors __________________________ | |
| ~FlatObject () | |
| FlatObject (const FlatObject &)=delete | |
| FlatObject & | operator= (const FlatObject &)=delete |
| template<typename T > | |
| T * | resizeArray (T *&ptr, int32_t oldSize, int32_t newSize, T *newPtr=nullptr) |
| template<typename T > | |
| T ** | resizeArray (T **&ptr, int32_t oldSize, int32_t newSize, T **newPtr=nullptr) |
| void | destroy () |
| _______________ Utilities _______________________________________________ | |
| GPUdi () size_t getFlatBufferSize() const | |
| Gives size of the flat buffer. | |
| GPUdi () 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 Spline1DContainer * | 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 the class functionality. | |
Static Public Member Functions inherited from o2::gpu::FlatObject | |
| static constexpr 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. | |
Protected Member Functions | |
| void | recreate (int32_t nYdim, int32_t numberOfKnots) |
| void | recreate (int32_t nYdim, int32_t numberOfKnots, const int32_t knotU[]) |
| int32_t * | getUtoKnotMap () |
| Non-const accessor to U->knots map. | |
| Knot< DataT > * | getKnots () |
| Non-const accessor to the knots array. | |
| ClassDefNV (Spline1DContainer, 1) | |
| (transient!!) pointer to F-dependent parameters inside the mFlatBufferPtr array | |
Protected Member Functions inherited from o2::gpu::FlatObject | |
| 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 * | mUtoKnotMap = nullptr |
| DataT * | mParameters = nullptr |
| (transient!!) pointer to (integer U -> knot index) map inside the mFlatBufferPtr array | |
Protected Attributes inherited from o2::gpu::FlatObject | |
| 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 | |
Public Attributes inherited from o2::gpu::Spline1DContainerBase< DataT, FlatObject > | |
| DataT | xMax |
| int32_t | mYdim |
| _____________ Data members ____________ | |
| int32_t | mNumberOfKnots |
| n knots on the grid | |
| int32_t | mUmax |
| U of the last knot. | |
| DataT | mXmin |
| X of the first knot. | |
| DataT | mXtoUscale |
| a scaling factor to convert X to U | |
Protected Types inherited from o2::gpu::FlatObject | |
| enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
| GPUCA_GPUCODE. More... | |
Static Protected Member Functions inherited from o2::gpu::FlatObject | |
| static constexpr size_t | getClassAlignmentBytes () |
| GPUCA_GPUCODE. | |
| static constexpr size_t | getBufferAlignmentBytes () |
| Gives minimal alignment in bytes required for the flat buffer. | |
Definition at line 138 of file Spline1DSpec.h.
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::approximateFunction | ( | double | xMin, |
| double | xMax, | ||
| std::function< void(double x, double f[])> | F, | ||
| int32_t | nAuxiliaryDataPoints = 4 |
||
| ) |
approximate a function F with this spline
|
protected |
(transient!!) pointer to F-dependent parameters inside the mFlatBufferPtr array
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::cloneFromObject | ( | const Spline1DContainer< DataT, FlatObject > & | obj, |
| char * | newFlatBufferPtr | ||
| ) |
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::destroy | ( | ) |
|
inlineprotected |
Non-const accessor to the knots array.
Definition at line 208 of file Spline1DSpec.h.
|
inlineprotected |
Non-const accessor to U->knots map.
Definition at line 205 of file Spline1DSpec.h.
|
inline |
Get spline parameters const.
Definition at line 165 of file Spline1DSpec.h.
|
inline |
Get a map (integer U -> corresponding knot index)
Definition at line 142 of file Spline1DSpec.h.
|
inline |
Get i-th knot.
Definition at line 149 of file Spline1DSpec.h.
|
inline |
Get the array of knots.
Definition at line 145 of file Spline1DSpec.h.
|
inline |
Get spline parameters.
Definition at line 162 of file Spline1DSpec.h.
| o2::gpu::Spline1DContainer< DataT, FlatObject >::GPUd | ( | ) | const |
Get index of an associated knot for a given U coordinate. Performs a boundary check.
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::importFrom | ( | const Spline1DContainerBase< DataT, OtherFlatBase > & | src | ) |
Copy schema fields from a spline with a different FlatBase. mUtoKnotMap and mParameters are set to nullptr; call setActualBufferAddress() afterward.
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::moveBufferTo | ( | char * | newBufferPtr | ) |
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::print | ( | ) | const |
Print method.
|
static |
read a class object from the file
|
protected |
|
protected |
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::setActualBufferAddress | ( | char * | actualFlatBufferPtr | ) |
| void o2::gpu::Spline1DContainer< DataT, FlatObject >::setFutureBufferAddress | ( | char * | futureFlatBufferPtr | ) |
|
static |
Test the class functionality.
| int32_t o2::gpu::Spline1DContainer< DataT, FlatObject >::writeToFile | ( | TFile & | outf, |
| const char * | name | ||
| ) |
write a class object to the file
|
protected |
(transient!!) pointer to (integer U -> knot index) map inside the mFlatBufferPtr array
Definition at line 211 of file Spline1DSpec.h.
|
protected |
Definition at line 210 of file Spline1DSpec.h.