Skip to content

Commit dbad636

Browse files
committed
Remove unnecessary GPUCA_GPUCODE protection in non-GPU code
1 parent 6e7655f commit dbad636

25 files changed

+32
-123
lines changed

Common/Field/src/MagFieldFast.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
#include "Field/MagFieldFast.h"
1717
#include <GPUCommonLogger.h>
1818

19-
#ifndef GPUCA_GPUCODE_DEVICE
2019
#include <cmath>
2120
#include <fstream>
2221
#include <sstream>
2322
using namespace std;
24-
#endif
2523

2624
using namespace o2::field;
2725

Common/Utils/src/DebugStreamer.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include "CommonUtils/DebugStreamer.h"
13-
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
1413
#include <thread>
1514
#include <fmt/format.h>
1615
#include "TROOT.h"
1716
#include "TKey.h"
1817
#include <random>
1918
#include "Framework/Logger.h"
20-
#endif
2119

2220
O2ParamImpl(o2::utils::ParameterDebugStreamer);
2321

24-
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) && defined(DEBUG_STREAMER)
22+
#if defined(DEBUG_STREAMER)
2523

2624
o2::utils::DebugStreamer::DebugStreamer()
2725
{

DataFormats/Detectors/TRD/src/Tracklet64.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ void Tracklet64::print() const
2525
HelperMethods::getSector(getDetector()), HelperMethods::getStack(getDetector()), HelperMethods::getLayer(getDetector()), getROB(), getMCM(), getPadRow(), getPadCol(), getPosition(), getSlope(), getPID(), getQ0(), getQ1(), getQ2(), getFormat());
2626
}
2727

28-
#ifndef GPUCA_GPUCODE_DEVICE
2928
void Tracklet64::printStream(std::ostream& stream) const
3029
{
3130
stream << "Tracklet64 : 0x" << std::hex << getTrackletWord();
@@ -50,7 +49,5 @@ bool operator<(const Tracklet64& lhs, const Tracklet64& rhs)
5049
(lhs.getDetector() == rhs.getDetector() && lhs.getROB() == rhs.getROB() && lhs.getMCM() == rhs.getMCM() && lhs.getPadRow() == rhs.getPadRow() && lhs.getPadCol() < rhs.getPadCol());
5150
}
5251

53-
#endif // GPUCA_GPUCODE_DEVICE
54-
5552
} // namespace trd
5653
} // namespace o2

DataFormats/Reconstruction/src/DCA.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,16 @@ namespace o2
2020
namespace dataformats
2121
{
2222

23-
#ifndef GPUCA_GPUCODE_DEVICE
2423
std::ostream& operator<<(std::ostream& os, const o2::dataformats::DCA& d)
2524
{
2625
// stream itself
2726
os << "DCA YZ {" << d.getY() << ", " << d.getZ() << "} Cov {" << d.getSigmaY2() << ", " << d.getSigmaYZ() << ", " << d.getSigmaZ2() << "}";
2827
return os;
2928
}
30-
#endif
3129

3230
void DCA::print() const
3331
{
34-
#ifndef GPUCA_GPUCODE_DEVICE
3532
std::cout << *this << '\n';
36-
#endif
3733
}
3834

3935
} // namespace dataformats

DataFormats/Reconstruction/src/Vertex.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ namespace o2
2020
namespace dataformats
2121
{
2222

23-
#ifndef GPUCA_GPUCODE_DEVICE
24-
#ifndef GPUCA_NO_FMT
2523
std::string VertexBase::asString() const
2624
{
2725
return fmt::format("Vtx {{{:+.4e},{:+.4e},{:+.4e}}} Cov.:{{{{{:.3e}..}},{{{:.3e},{:.3e}..}},{{{:.3e},{:.3e},{:.3e}}}}}",
@@ -39,7 +37,6 @@ void VertexBase::print() const
3937
{
4038
std::cout << *this << std::endl;
4139
}
42-
#endif
4340

4441
bool VertexBase::operator==(const VertexBase& other) const
4542
{
@@ -54,8 +51,6 @@ bool VertexBase::operator==(const VertexBase& other) const
5451
return true;
5552
}
5653

57-
#endif
58-
5954
template class o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
6055
template class o2::dataformats::Vertex<o2::dataformats::TimeStampWithError<float, float>>;
6156

Detectors/ITSMFT/ITS/tracking/src/Cluster.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ Cluster::Cluster(const int layerIndex, const float3& primaryVertex, const IndexT
6969

7070
GPUhd() void Cluster::print() const
7171
{
72-
#if !defined(GPUCA_GPUCODE_DEVICE) || (!defined(__OPENCL__) && defined(GPUCA_GPU_DEBUG_PRINT))
7372
printf("Cluster: %f %f %f %f %f %d %d\n", xCoordinate, yCoordinate, zCoordinate, phi, radius, clusterId, indexTableBinIndex);
74-
#endif
7573
}
7674

7775
TrackingFrameInfo::TrackingFrameInfo(float x, float y, float z, float xTF, float alpha, std::array<float, 2>&& posTF,
@@ -83,10 +81,8 @@ TrackingFrameInfo::TrackingFrameInfo(float x, float y, float z, float xTF, float
8381

8482
GPUhd() void TrackingFrameInfo::print() const
8583
{
86-
#if !defined(GPUCA_GPUCODE_DEVICE) || (!defined(__OPENCL__) && defined(GPUCA_GPU_DEBUG_PRINT))
8784
printf("x: %f y: %f z: %f xTF: %f alphaTF: %f posTF: %f %f covTF: %f %f %f\n",
8885
xCoordinate, yCoordinate, zCoordinate, xTrackingFrame, alphaTrackingFrame,
8986
positionTrackingFrame[0], positionTrackingFrame[1],
9087
covarianceTrackingFrame[0], covarianceTrackingFrame[1], covarianceTrackingFrame[2]);
91-
#endif
9288
}

Detectors/TPC/calibration/src/CorrectionMapsOptions.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
using namespace o2::tpc;
1717
using namespace o2::framework;
1818

19-
#ifndef GPUCA_GPUCODE_DEVICE
20-
2119
//________________________________________________________
2220
CorrectionMapsGloOpts CorrectionMapsOptions::parseGlobalOptions(const o2::framework::ConfigParamRegistry& opts)
2321
{
@@ -59,5 +57,3 @@ void CorrectionMapsOptions::addOption(std::vector<ConfigParamSpec>& options, Con
5957
options.emplace_back(osp);
6058
}
6159
}
62-
63-
#endif // #ifndef GPUCA_GPUCODE_DEVICE

GPU/GPUTracking/DataTypes/CalibdEdxTrackTopologyPol.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
using namespace o2::tpc;
2222

23-
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) // code invisible on GPU and in the standalone compilation
23+
#if !defined(GPUCA_STANDALONE) // code invisible on GPU and in the standalone compilation
2424
#include "NDPiecewisePolynomials.inc"
2525
void CalibdEdxTrackTopologyPol::dumpToTree(const uint32_t nSamplingPoints[/* Dim */], const char* outName) const
2626
{

GPU/GPUTracking/DataTypes/GPUTPCGMPolynomialField.cxx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include "GPUTPCGMPolynomialField.h"
1616
using namespace o2::gpu;
1717

18-
#if !defined(GPUCA_GPUCODE)
19-
2018
#include "GPUCommonConstants.h"
2119
#include <iostream>
2220
#include <iomanip>
@@ -129,12 +127,3 @@ void GPUTPCGMPolynomialField::Print() const
129127
}
130128
}
131129
}
132-
133-
#else
134-
135-
void GPUTPCGMPolynomialField::Print() const
136-
{
137-
// do nothing
138-
}
139-
140-
#endif

GPU/GPUTracking/Debug/GPUROOTDumpCore.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "GPUROOTDumpCore.h"
1616

17-
#if (!defined(GPUCA_STANDALONE) || defined(GPUCA_BUILD_QA)) && !defined(GPUCA_GPUCODE)
17+
#if (!defined(GPUCA_STANDALONE) || defined(GPUCA_BUILD_QA))
1818
#include <atomic>
1919
#include <memory>
2020
#include <TFile.h>

0 commit comments

Comments
 (0)