Add POD version of TPCFastTransform#137
Open
shahor02 wants to merge 1 commit intodavidrohr:dev_pull_request6from
Open
Add POD version of TPCFastTransform#137shahor02 wants to merge 1 commit intodavidrohr:dev_pull_request6from
shahor02 wants to merge 1 commit intodavidrohr:dev_pull_request6from
Conversation
The TPCFastTransformPOD is a pointerless version of the TPCFastTransform. It can be created from the
original TPCFastTransform as e.g.
auto lold = o2::gpu::TPCFastTransform::loadFromFile("o2-gpu-TPCFastTransform.root","ccdb_object"); // load original transform
std::vector<char> v; // one has to provide a vector (could be a std or pmr), which later can be messaged via DPL
auto* pod = o2::gpu::TPCFastTransformPOD::create(v, *lold); // pointer pod is just v.data() cast to TPCFastTransformPOD*
// run test:
pod->test(*lold);
[INFO] (ns per call) original this Nmissmatch
[INFO] getCorrection 1.330e+02 1.400e+02 0
[INFO] getCorrectionInvCorrectedX 8.856e+01 8.434e+01 0
[INFO] getCorrectionInvUV 6.266e+01 6.142e+01 0
It can be also created directly from the TPCFastSpaceChargeCorrection as
TPCFastSpaceChargeCorrection& oldCorr = lold->getCorrection();
auto* pod = o2::gpu::TPCFastTransformPOD::create(v, oldCorr);
but in this case one should afterwards set the vdrift and t0 using provided getters.
TPCFastTransformPOD replicates all the methods of the TPCFastTransform (and of the TPCFastSpaceChargeCorrection), including
those which allow to query rescaled corrections (by providing refernce maps and scaling coefficients).
Since the idea of this class is to create a final correction map as a weighted sum of different contribution and to distribute
it to consumer processes via shared memory, also the query methods w/o rescaling are added, they have the suffix _new added.
Eventually, the scalable legacy methods can be suppressed and the suffix new can be dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The TPCFastTransformPOD is a pointerless version of the TPCFastTransform. It can be created from the original TPCFastTransform as e.g.
It can also be created directly from the TPCFastSpaceChargeCorrection as TPCFastSpaceChargeCorrection& oldCorr = lold->getCorrection(); auto* pod = o2::gpu::TPCFastTransformPOD::create(v, oldCorr); but in this case, one should afterwards set the vdrift and t0 using provided getters.
TPCFastTransformPOD replicates all the methods of the TPCFastTransform (and of the TPCFastSpaceChargeCorrection), including those which allow to query rescaled corrections (by providing reference maps and scaling coefficients). Since the idea of this class is to create a final correction map as a weighted sum of different contributions and to distribute it to consumer processes via shared memory, also the query methods w/o rescaling are added, they have the suffix _new added. Eventually, the scalable legacy methods can be suppressed, and the suffix new can be dropped.