Skip to content

Commit 5577abf

Browse files
committed
GPU: ConstantMem object should not be constructible / destructible in device code
1 parent da6a839 commit 5577abf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

GPU/GPUTracking/Base/GPUConstantMem.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,16 @@ GPUdi() auto& GPUConstantMem::getTRDTracker<1>()
122122

123123
#ifdef GPUCA_NOCOMPAT
124124
union GPUConstantMemCopyable {
125-
GPUConstantMemCopyable() {} // NOLINT: We want an empty constructor, not a default one
126-
~GPUConstantMemCopyable() {} // NOLINT: We want an empty destructor, not a default one
127-
GPUConstantMemCopyable(const GPUConstantMemCopyable& o)
125+
#if !defined(__OPENCL__) || defined(__OPENCL_HOST__)
126+
GPUh() GPUConstantMemCopyable() {} // NOLINT: We want an empty constructor, not a default one
127+
GPUh() ~GPUConstantMemCopyable() {} // NOLINT: We want an empty destructor, not a default one
128+
GPUh() GPUConstantMemCopyable(const GPUConstantMemCopyable& o)
128129
{
129130
for (unsigned int k = 0; k < sizeof(GPUConstantMem) / sizeof(int); k++) {
130131
((int*)&v)[k] = ((int*)&o.v)[k];
131132
}
132133
}
134+
#endif
133135
GPUConstantMem v;
134136
};
135137
#endif

GPU/GPUTracking/Global/GPUChainTrackingDebugAndProfiling.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void GPUChainTracking::PrintOutputStat()
244244
}
245245
snprintf(trdText, 1024, " - TRD Tracker reconstructed %d tracks (%d tracklets)", nTRDTracks, nTRDTracklets);
246246
}
247-
GPUInfo("Output Tracks: %d (%d / %d / %d / %d clusters (fitted / attached / adjacent / total))%s", nTracks, nAttachedClustersFitted, nAttachedClusters, nAdjacentClusters, nCls, trdText);
247+
GPUInfo("Output Tracks: %d (%d / %d / %d / %d clusters (fitted / attached / adjacent / total) - %s format)%s", nTracks, nAttachedClustersFitted, nAttachedClusters, nAdjacentClusters, nCls, ProcessingSettings().createO2Output > 1 ? "O2" : "GPU", trdText);
248248
}
249249

250250
void GPUChainTracking::SanityCheck()

0 commit comments

Comments
 (0)