Skip to content

Commit 5ed9608

Browse files
Revert "Use reflections"
This reverts commit 67db6a2.
1 parent 67db6a2 commit 5ed9608

7 files changed

Lines changed: 95 additions & 169 deletions

File tree

GPU/Common/MemLayout.h

Lines changed: 81 additions & 167 deletions
Large diffs are not rendered by default.

GPU/GPUTracking/Global/GPUChainTracking.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ struct ApplyRecursive {
575575

576576
template <template <template <class> class> class S>
577577
S<MemLayout::const_pointer> operator()(S<MemLayout::const_pointer>& soaIOPtr, S<GPUChainTracking::unique_ptr_array>& soaIOMem) const {
578-
return apply(soaIOPtr, soaIOMem, ApplyRecursive{f});
578+
return soaIOPtr.apply(soaIOMem, ApplyRecursive{f});
579579
}
580580
};
581581

GPU/GPUTracking/SectorTracker/GPUTPCBaseTrackParam.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ struct GPUTPCParameter
5454
template <template <class> class F>
5555
struct GPUTPCBaseTrackParamSkeleton
5656
{
57+
MEMLAYOUT_APPLY_UNARY(mX, mC, mZOffset, mP)
58+
MEMLAYOUT_APPLY_BINARY(GPUTPCBaseTrackParamSkeleton, MEMLAYOUT_EXPAND(mX), MEMLAYOUT_EXPAND(mC), MEMLAYOUT_EXPAND(mZOffset), MEMLAYOUT_EXPAND(mP))
59+
5760
GPUd() float X() const { return mX; }
5861
GPUd() float Y() const { return mP[0]; }
5962
GPUd() float Z() const { return mP[1]; }

GPU/GPUTracking/SectorTracker/GPUTPCTrack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ template <template <class> class F>
3434
class GPUTPCTrackSkeleton
3535
{
3636
public:
37+
MEMLAYOUT_APPLY_UNARY(mFirstHitID, mNHits, mLocalTrackId, mParam)
38+
MEMLAYOUT_APPLY_BINARY(GPUTPCTrackSkeleton, MEMLAYOUT_EXPAND(mFirstHitID), MEMLAYOUT_EXPAND(mNHits), MEMLAYOUT_EXPAND(mLocalTrackId), MEMLAYOUT_EXPAND(mParam))
39+
3740
//#if !defined(GPUCA_GPUCODE)
3841
// GPUTPCTrack() : mFirstHitID(0), mNHits(0), mLocalTrackId(-1), mParam() {}
3942
// ~GPUTPCTrackSkeleton() = default;

GPU/GPUTracking/SectorTracker/GPUTPCTrackParam.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ template <template <class> class F>
4545
class GPUTPCTrackParamSkeleton
4646
{
4747
public:
48+
MEMLAYOUT_APPLY_UNARY(mParam, mSignCosPhi, mChi2, mNDF)
49+
MEMLAYOUT_APPLY_BINARY(GPUTPCTrackParamSkeleton, MEMLAYOUT_EXPAND(mParam), MEMLAYOUT_EXPAND(mSignCosPhi), MEMLAYOUT_EXPAND(mChi2), MEMLAYOUT_EXPAND(mNDF))
50+
4851
GPUd() MemLayout::wrapper<GPUTPCBaseTrackParamSkeleton, MemLayout::const_reference> GetParam() const { return mParam; }
4952
GPUd() void SetParam(MemLayout::wrapper<GPUTPCBaseTrackParamSkeleton, MemLayout::const_reference> v);
5053
GPUd() void InitParam();

GPU/GPUTracking/SectorTracker/GPUTPCTracker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct ApplyRecursive {
133133
void operator()(T * & aos) const { f(aos); }
134134

135135
template <template <template <class> class> class S>
136-
void operator()(S<MemLayout::pointer>& soa) const { apply(soa, ApplyMemberwise<ApplyRecursive>{f}); }
136+
void operator()(S<MemLayout::pointer>& soa) const { soa.apply(ApplyMemberwise<ApplyRecursive>{f}); }
137137
};
138138

139139
}

GPU/GPUTracking/SectorTracker/GPUTPCTracklet.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ template <template <class> class F>
3333
class GPUTPCTrackletSkeleton
3434
{
3535
public:
36+
MEMLAYOUT_APPLY_UNARY(mFirstRow, mLastRow, mParam, mHitWeight, mFirstHit)
37+
MEMLAYOUT_APPLY_BINARY(GPUTPCTrackletSkeleton, MEMLAYOUT_EXPAND(mFirstRow), MEMLAYOUT_EXPAND(mLastRow), MEMLAYOUT_EXPAND(mParam), MEMLAYOUT_EXPAND(mHitWeight), MEMLAYOUT_EXPAND(mFirstHit))
38+
3639
//#if !defined(GPUCA_GPUCODE)
3740
//GPUTPCTrackletSkeleton() : mFirstRow(0), mLastRow(0), mParam(), mHitWeight(0), mFirstHit(0) {};
3841
//#endif //! GPUCA_GPUCODE

0 commit comments

Comments
 (0)