Skip to content

Commit 154ffd4

Browse files
committed
GPU: Plenty of clang-format fixes
1 parent b8feb4d commit 154ffd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+250
-255
lines changed

GPU/GPUTracking/Base/GPUParam.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ struct GPUParam_t {
5959
int32_t continuousMaxTimeBin;
6060
int32_t tpcCutTimeBin;
6161

62-
GPUTPCGeometry tpcGeometry; // TPC Geometry
63-
GPUTPCGMPolynomialField polynomialField; // Polynomial approx. of magnetic field for TPC GM
64-
const uint32_t* occupancyMap; // Ptr to TPC occupancy map
65-
uint32_t occupancyTotal; // Total occupancy in the TPC (nCl / nHbf)
62+
GPUTPCGeometry tpcGeometry; // TPC Geometry
63+
GPUTPCGMPolynomialField polynomialField; // Polynomial approx. of magnetic field for TPC GM
64+
const uint32_t* occupancyMap; // Ptr to TPC occupancy map
65+
uint32_t occupancyTotal; // Total occupancy in the TPC (nCl / nHbf)
6666

6767
GPUParamSector SectorParam[GPUCA_NSECTORS];
6868

GPU/GPUTracking/Base/GPUReconstruction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace gpu_reconstruction_kernels
5252
{
5353
struct deviceEvent;
5454
class threadContext;
55-
}
55+
} // namespace gpu_reconstruction_kernels
5656

5757
class GPUReconstruction
5858
{
@@ -193,7 +193,7 @@ class GPUReconstruction
193193
bool IsInitialized() const { return mInitialized; }
194194
void SetSettings(float solenoidBzNominalGPU, const GPURecoStepConfiguration* workflow = nullptr);
195195
void SetSettings(const GPUSettingsGRP* grp, const GPUSettingsRec* rec = nullptr, const GPUSettingsProcessing* proc = nullptr, const GPURecoStepConfiguration* workflow = nullptr);
196-
void SetResetTimers(bool reset) { mProcessingSettings.resetTimers = reset; } // May update also after Init()
196+
void SetResetTimers(bool reset) { mProcessingSettings.resetTimers = reset; } // May update also after Init()
197197
void SetDebugLevelTmp(int32_t level) { mProcessingSettings.debugLevel = level; } // Temporarily, before calling SetSettings()
198198
void UpdateSettings(const GPUSettingsGRP* g, const GPUSettingsProcessing* p = nullptr, const GPUSettingsRecDynamic* d = nullptr);
199199
void UpdateDynamicSettings(const GPUSettingsRecDynamic* d);

GPU/GPUTracking/Base/GPUReconstructionConvert.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ void zsEncoderDenseLinkBased::decodePage(std::vector<o2::tpc::Digit>& outputBuff
923923
if (decLinkX & 0b00100000) {
924924
bitmaskL2.set();
925925
} else {
926-
bitmaskL2 = std::bitset<10>(((((uint16_t)decLinkX) & 0b11000000) << 2) | (uint16_t) * ((const uint8_t*)decPagePtr));
926+
bitmaskL2 = std::bitset<10>(((((uint16_t)decLinkX) & 0b11000000) << 2) | (uint16_t)*((const uint8_t*)decPagePtr));
927927
decPagePtr += sizeof(uint8_t);
928928
}
929929

GPU/GPUTracking/Base/GPUReconstructionProcessing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace gpu_reconstruction_kernels
2828
{
2929
struct deviceEvent {
3030
constexpr deviceEvent() = default;
31-
constexpr deviceEvent(std::nullptr_t p) : v(nullptr){};
31+
constexpr deviceEvent(std::nullptr_t p) : v(nullptr) {};
3232
template <class T>
3333
void set(T val)
3434
{

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ size_t GPUReconstructionCUDA::GPUMemCpy(void* dst, const void* src, size_t size,
496496
for (int32_t k = 0; k < nEvents; k++) {
497497
GPUChkErr(cudaStreamWaitEvent(mInternals->Streams[stream], evList[k].get<cudaEvent_t>(), 0));
498498
}
499-
GPUChkErr(cudaMemcpyAsync(dst, src, size, toGPU == -2 ? cudaMemcpyDeviceToDevice : toGPU ? cudaMemcpyHostToDevice : cudaMemcpyDeviceToHost, mInternals->Streams[stream]));
499+
GPUChkErr(cudaMemcpyAsync(dst, src, size, toGPU == -2 ? cudaMemcpyDeviceToDevice : (toGPU ? cudaMemcpyHostToDevice : cudaMemcpyDeviceToHost), mInternals->Streams[stream]));
500500
}
501501
if (ev) {
502502
GPUChkErr(cudaEventRecord(ev->get<cudaEvent_t>(), mInternals->Streams[stream == -1 ? 0 : stream]));

GPU/GPUTracking/DataTypes/GPUOutputControl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct GPUTrackingOutputs {
7878
static constexpr size_t count() { return sizeof(GPUTrackingOutputs) / sizeof(GPUOutputControl); }
7979
GPUOutputControl* asArray() { return (GPUOutputControl*)this; }
8080
size_t getIndex(const GPUOutputControl& v) { return &v - (const GPUOutputControl*)this; }
81-
static int32_t getIndex(GPUOutputControl GPUTrackingOutputs::*v) { return &(((GPUTrackingOutputs*)(0x10000))->*v) - (GPUOutputControl*)(0x10000); }
81+
static int32_t getIndex(GPUOutputControl GPUTrackingOutputs::* v) { return &(((GPUTrackingOutputs*)(0x10000))->*v) - (GPUOutputControl*)(0x10000); }
8282
};
8383

8484
} // namespace o2::gpu

GPU/GPUTracking/DataTypes/GPUSettings.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ struct GPUSettingsTF {
7373

7474
// Settings defining the setup of the GPUReconstruction processing (basically selecting the device / class instance)
7575
struct GPUSettingsDeviceBackend {
76-
uint32_t deviceType = GPUDataTypes::DeviceType::CPU; // Device type, shall use GPUDataTypes::DEVICE_TYPE constants, e.g. CPU / CUDA
77-
uint8_t forceDeviceType = 1; // Fail if device initialization fails, otherwise falls back to CPU
78-
GPUReconstruction* master = nullptr; // GPUReconstruction master object
76+
uint32_t deviceType = GPUDataTypes::DeviceType::CPU; // Device type, shall use GPUDataTypes::DEVICE_TYPE constants, e.g. CPU / CUDA
77+
uint8_t forceDeviceType = 1; // Fail if device initialization fails, otherwise falls back to CPU
78+
GPUReconstruction* master = nullptr; // GPUReconstruction master object
7979
};
8080

8181
} // namespace o2::gpu

GPU/GPUTracking/DataTypes/GPUTRDTrack.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ class GPUTRDTrack_t : public T
107107
GPUd() void setHasPadrowCrossing() { mIsCrossingNeighbor |= (1U << 7); }
108108

109109
protected:
110-
float mChi2; // total chi2.
111-
float mSignal{-1.f}; // electron Likelihood for track
112-
uint32_t mRefGlobalTrackId; // raw GlobalTrackID of the seeding track (either ITS-TPC or TPC)
110+
float mChi2; // total chi2.
111+
float mSignal{-1.f}; // electron Likelihood for track
112+
uint32_t mRefGlobalTrackId; // raw GlobalTrackID of the seeding track (either ITS-TPC or TPC)
113113
int32_t mAttachedTracklets[kNLayers]; // indices of the tracklets attached to this track; -1 means no tracklet in that layer
114114
int16_t mCollisionId; // the collision ID of the tracklets attached to this track; is used to retrieve the BC information for this track after the tracking is done
115115
uint8_t mFlags; // bits 0 to 5 indicate whether track is findable in layer 0 to 5, bit 6 indicates an ambiguous track and bit 7 flags if the track is stopped in the TRD

GPU/GPUTracking/Global/GPUChain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class GPUChain
4646
virtual int32_t Finalize() = 0;
4747
virtual int32_t RunChain() = 0;
4848
virtual void MemorySize(size_t& gpuMem, size_t& pageLockedHostMem) = 0;
49-
virtual void PrintMemoryStatistics(){};
49+
virtual void PrintMemoryStatistics() {};
5050
virtual int32_t CheckErrorCodes(bool cpuOnly = false, bool forceShowErrors = false, std::vector<std::array<uint32_t, 4>>* fillErrors = nullptr) { return 0; }
5151
virtual bool SupportsDoublePipeline() { return false; }
5252
virtual int32_t FinalizePipelinedProcessing() { return 0; }

GPU/GPUTracking/Global/GPUChainTracking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class MatLayerCylSet;
4343

4444
namespace o2::gpu
4545
{
46-
//class GPUTRDTrackerGPU;
46+
// class GPUTRDTrackerGPU;
4747
class GPUTPCGPUTracker;
4848
class GPUDisplayInterface;
4949
class GPUQA;

0 commit comments

Comments
 (0)