Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void TPCFastSpaceChargeCorrection::setActualBufferAddress(char* actualFlatBuffer
}
size_t bufferSize = scBufferOffset + scBufferSize;
for (int32_t is = 0; is < 3; is++) {
bufferSize = alignSize(bufferSize, SplineType::getParameterAlignmentBytes());
mCorrectionData[is] = reinterpret_cast<char*>(mFlatBufferPtr + bufferSize);
bufferSize += mSectorDataSizeBytes[is] * mGeo.getNumberOfSectors();
}
Expand Down Expand Up @@ -255,7 +256,7 @@ void TPCFastSpaceChargeCorrection::setActualBufferAddress(char* actualFlatBuffer

for (int32_t is = 0; is < 3; is++) {
size_t oldCorrectionDataOffset = alignSize(oldBufferSize, SplineType::getParameterAlignmentBytes());
size_t correctionDataOffset = bufferSize;
size_t correctionDataOffset = alignSize(bufferSize, SplineType::getParameterAlignmentBytes());
mCorrectionData[is] = reinterpret_cast<char*>(mFlatBufferPtr + correctionDataOffset);
memmove(mCorrectionData[is], mFlatBufferPtr + oldCorrectionDataOffset, mSectorDataSizeBytes[is] * mGeo.getNumberOfSectors());
oldBufferSize = oldCorrectionDataOffset + mSectorDataSizeBytes[is] * mGeo.getNumberOfSectors();
Expand Down Expand Up @@ -508,6 +509,7 @@ void TPCFastSpaceChargeCorrection::finishConstruction()
size_t bufferSize = scBufferOffsets[0] + scBufferSize;
size_t correctionDataOffset[3];
for (int32_t is = 0; is < 3; is++) {
bufferSize = alignSize(bufferSize, SplineType::getParameterAlignmentBytes());
correctionDataOffset[is] = bufferSize;
mSectorDataSizeBytes[is] = 0;
for (int32_t j = 0; j < mGeo.getNumberOfRows(); j++) {
Expand All @@ -524,6 +526,7 @@ void TPCFastSpaceChargeCorrection::finishConstruction()
const SplineTypeInvYZ& splineInvYZ = reinterpret_cast<const SplineTypeInvYZ&>(spline);
mSectorDataSizeBytes[is] += splineInvYZ.getSizeOfParameters();
}
mSectorDataSizeBytes[is] = alignSize(mSectorDataSizeBytes[is], SplineType::getParameterAlignmentBytes());
}
bufferSize += mSectorDataSizeBytes[is] * mGeo.getNumberOfSectors();
}
Expand Down
2 changes: 2 additions & 0 deletions GPU/TPCFastTransformation/TPCFastTransformPOD.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ size_t TPCFastTransformPOD::estimateSize(const TPCFastSpaceChargeCorrection& ori
}
// space for splines data
for (int is = 0; is < 3; is++) {
nextDynOffs = FlatObject::alignSize(nextDynOffs, SplineType::getParameterAlignmentBytes());
nextDynOffs += origCorr.mSectorDataSizeBytes[is] * TPCFastTransformGeo::getNumberOfSectors();
}
nextDynOffs = alignOffset(nextDynOffs);
Expand Down Expand Up @@ -159,6 +160,7 @@ TPCFastTransformPOD* TPCFastTransformPOD::create(char* buff, size_t buffSize, co

// copy spline data
for (int is = 0; is < 3; is++) {
nextDynOffs = FlatObject::alignSize(nextDynOffs, SplineType::getParameterAlignmentBytes());
float* data = reinterpret_cast<float*>(buff + nextDynOffs);
LOGP(debug, "splinID={} start offset {} -> {}", is, nextDynOffs, (void*)data);

Expand Down