![]() |
Project
|
#include <SemiregularSpline2D3D.h>
Inherits o2::gpu::FlatObject.
Public Member Functions | |
SemiregularSpline2D3D () | |
_____________ Constructors / destructors __________________________ | |
SemiregularSpline2D3D (const SemiregularSpline2D3D &)=delete | |
Copy constructor: disabled to avoid ambiguity. Use cloneFromObject() instead. | |
SemiregularSpline2D3D & | operator= (const SemiregularSpline2D3D &)=delete |
Assignment operator: disabled to avoid ambiguity. Use cloneFromObject() instead. | |
~SemiregularSpline2D3D ()=default | |
Destructor. | |
void | cloneFromObject (const SemiregularSpline2D3D &obj, char *newFlatBufferPtr) |
Construction interface. | |
void | destroy () |
void | moveBufferTo (char *newBufferPtr) |
void | setActualBufferAddress (char *actualFlatBufferPtr) |
Moving the class with its external buffer to another location. | |
void | setFutureBufferAddress (char *futureFlatBufferPtr) |
void | construct (const int32_t numberOfRows, const int32_t numbersOfKnots[]) |
_______________ Construction interface ________________________ | |
template<typename T > | |
void | correctEdges (T *data) const |
_______________ Main functionality ________________________ | |
template<typename T > | |
void | getSpline (const T *correctedData, float u, float v, T &x, T &y, T &z) const |
Get interpolated value for f(u,v) using data array correctedData[getNumberOfKnots()] with corrected edges. | |
void | getSplineVec (const float *correctedData, float u, float v, float &x, float &y, float &z) const |
int32_t | getNumberOfKnots () const |
Get number total of knots: UxV. | |
int32_t | getNumberOfRows () const |
Get number of rows. Always the same as gridV's number of knots. | |
const RegularSpline1D & | getGridV () const |
Get 1-D grid for U coordinate. | |
const RegularSpline1D & | getGridU (const int32_t i) const |
Get 1-D grid for V coordinate. | |
void | getKnotUV (int32_t iKnot, float &u, float &v) const |
Get u,v of i-th knot. | |
size_t | getFlatBufferSize () const |
Get size of the mFlatBuffer data. | |
int32_t | getDataIndex (int32_t i, int32_t j) const |
Gets the knot index which is the i-th knot in v-space and the j-th knot in u-space. | |
int32_t | getDataIndex0 (int32_t i, int32_t j) const |
int32_t | getDataIndexMapOffset () const |
Gets the offset for the data index map inside the flat buffer. | |
const char * | getFlatBufferPtr () const |
Get pointer to the flat buffer. | |
const RegularSpline1D * | getSplineArray () const |
const int32_t * | getDataIndexMap () const |
char * | releaseInternalBuffer () |
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 constexpr size_t | getClassAlignmentBytes () |
Get minimal required alignment for the class. | |
static constexpr size_t | getBufferAlignmentBytes () |
Get minimal required alignment for the flat buffer. | |
static constexpr size_t | getDataAlignmentBytes () |
Get minimal required alignment for the spline data. | |
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. | |
Additional Inherited Members | |
![]() | |
enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
GPUCA_GPUCODE. More... | |
![]() | |
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. | |
![]() | |
static constexpr size_t | getClassAlignmentBytes () |
_____________ Memory alignment __________________________ | |
static constexpr size_t | getBufferAlignmentBytes () |
Gives minimal alignment in bytes required for the flat buffer. | |
![]() | |
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 |
The SemiregularSpline2D3D class represents twoo-dimensional spline interpolation on a semi-unifom grid.
The class is flat C structure. No virtual methods, no ROOT types are used. It is designed for spline parameterisation of TPC transformation.
The spline interpolates a generic function F:[u,v)->(x,y,z), where u,v belong to [0,1]x[0,1]
It is a variation of IrregularSpline2D3D class, see IrregularSpline2D3D.h for more details.
Important: – The number of knots may change during initialisation – Don't forget to call correctEdges() for the array of F values (see IrregularSpline2D3D.h )
Definition at line 52 of file SemiregularSpline2D3D.h.
o2::gpu::SemiregularSpline2D3D::SemiregularSpline2D3D | ( | ) |
_____________ Constructors / destructors __________________________
Default constructor. Creates an empty uninitialised object
Default constructor. Creates an empty uninitialised object
Definition at line 25 of file SemiregularSpline2D3D.cxx.
|
delete |
Copy constructor: disabled to avoid ambiguity. Use cloneFromObject() instead.
|
default |
Destructor.
void o2::gpu::SemiregularSpline2D3D::cloneFromObject | ( | const SemiregularSpline2D3D & | obj, |
char * | newFlatBufferPtr | ||
) |
Construction interface.
See FlatObject for description
Definition at line 56 of file SemiregularSpline2D3D.cxx.
void o2::gpu::SemiregularSpline2D3D::construct | ( | const int32_t | numberOfRows, |
const int32_t | numbersOfKnots[] | ||
) |
_______________ Construction interface ________________________
Constructor
Constructor
When the number of rows / knots is less than 5 it will be set to 5
Definition at line 99 of file SemiregularSpline2D3D.cxx.
|
inline |
_______________ Main functionality ________________________
Correction of data values at edge knots.
It is needed for the fast spline mathematics to work correctly. See explanation in IrregularSpline1D.h header
data | array of function values. It has the size of getNumberOfKnots() |
Definition at line 230 of file SemiregularSpline2D3D.h.
void o2::gpu::SemiregularSpline2D3D::destroy | ( | ) |
Definition at line 35 of file SemiregularSpline2D3D.cxx.
|
inlinestaticconstexpr |
_____________ FlatObject functionality, see FlatObject class for description ____________
Memory alignment
Definition at line 197 of file FlatObject.h.
|
inlinestaticconstexpr |
Get minimal required alignment for the flat buffer.
Definition at line 148 of file SemiregularSpline2D3D.h.
|
inlinestaticconstexpr |
_____________ Memory alignment __________________________
Gives minimal alignment in bytes required for the class object
Definition at line 194 of file FlatObject.h.
|
inlinestaticconstexpr |
Get minimal required alignment for the class.
Definition at line 145 of file SemiregularSpline2D3D.h.
|
inlinestaticconstexpr |
Get minimal required alignment for the spline data.
Definition at line 151 of file SemiregularSpline2D3D.h.
|
inline |
Gets the knot index which is the i-th knot in v-space and the j-th knot in u-space.
====================================================
Definition at line 193 of file SemiregularSpline2D3D.h.
|
inline |
Definition at line 198 of file SemiregularSpline2D3D.h.
|
inline |
Definition at line 159 of file SemiregularSpline2D3D.h.
|
inline |
Gets the offset for the data index map inside the flat buffer.
Definition at line 139 of file SemiregularSpline2D3D.h.
|
inline |
Get pointer to the flat buffer.
Definition at line 142 of file SemiregularSpline2D3D.h.
|
inline |
Get size of the mFlatBuffer data.
Definition at line 132 of file SemiregularSpline2D3D.h.
|
inline |
Get 1-D grid for V coordinate.
Definition at line 126 of file SemiregularSpline2D3D.h.
|
inline |
Get 1-D grid for U coordinate.
Definition at line 122 of file SemiregularSpline2D3D.h.
|
inline |
Get u,v of i-th knot.
Definition at line 203 of file SemiregularSpline2D3D.h.
|
inline |
Get number total of knots: UxV.
Definition at line 116 of file SemiregularSpline2D3D.h.
|
inline |
Get number of rows. Always the same as gridV's number of knots.
Definition at line 119 of file SemiregularSpline2D3D.h.
|
inline |
Get interpolated value for f(u,v) using data array correctedData[getNumberOfKnots()] with corrected edges.
Definition at line 363 of file SemiregularSpline2D3D.h.
|
inline |
Definition at line 154 of file SemiregularSpline2D3D.h.
|
inline |
Same as getSpline, but using vectorized calculation.
correctedData | should be at least 128-bit aligned |
Definition at line 396 of file SemiregularSpline2D3D.h.
See FlatObject for description
Definition at line 67 of file SemiregularSpline2D3D.cxx.
|
delete |
Assignment operator: disabled to avoid ambiguity. Use cloneFromObject() instead.
|
inline |
Making the data buffer external.
Definition at line 220 of file FlatObject.h.
Moving the class with its external buffer to another location.
See FlatObject for description
Definition at line 75 of file SemiregularSpline2D3D.cxx.
See FlatObject for description
Definition at line 83 of file SemiregularSpline2D3D.cxx.