Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy: Move Spline Eval Away from parraler region #321

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions samplePDF/samplePDFFDBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,13 @@ void samplePDFFDBase::fillArray_MP() {
size_t nXBins = int(XBinEdges.size()-1);
size_t nYBins = int(YBinEdges.size()-1);

PrepFunctionalParameters();
//==================================================
//Calc Weights and fill Array
if(SplineHandler){
SplineHandler->Evaluate();
}

//This is stored as [y][x] due to shifts only occurring in the x variable (Erec/Lep mom) - I believe this will help reduce cache misses
double** samplePDFFD_array_private = nullptr;
double** samplePDFFD_array_private_w2 = nullptr;
Expand Down Expand Up @@ -481,14 +488,6 @@ void samplePDFFDBase::fillArray_MP() {
//
// We will hit <0.1 s/step eventually! :D

//ETA - does these three calls need to be inside the omp parrallel region?
//I don't think this will affect anything but maybe should check.
PrepFunctionalParameters();
//==================================================
//Calc Weights and fill Array
if(SplineHandler){
SplineHandler->Evaluate();
}
for (unsigned int iSample=0;iSample<MCSamples.size();iSample++) {
#pragma omp for
for (int iEvent=0;iEvent<MCSamples[iSample].nEvents;iEvent++) {
Expand Down
Loading