Skip to content

Commit 8093172

Browse files
committed
GPU: Hide some code from GPU standalone compilation
1 parent 2b89a7f commit 8093172

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

Detectors/TPC/base/include/TPCBase/CalArray.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
#include <string>
1818
#include <numeric>
1919
#include <type_traits>
20-
#include <boost/format.hpp>
21-
22-
#include "FairLogger.h"
2320

2421
#include "TPCBase/Mapper.h"
2522

26-
using boost::format;
23+
#ifndef GPUCA_ALIGPUCODE
24+
#include "FairLogger.h"
25+
#include <boost/format.hpp>
26+
#endif
2727

2828
namespace o2
2929
{
@@ -146,6 +146,8 @@ class CalArray
146146
void initData();
147147
};
148148

149+
#ifndef GPUCA_ALIGPUCODE
150+
149151
// ===| pad region etc. initialisation |========================================
150152
template <class T>
151153
void CalArray<T>::initData()
@@ -298,6 +300,9 @@ inline const CalArray<T>& CalArray<T>::operator/=(const T& val)
298300
}
299301

300302
using CalROC = CalArray<float>;
303+
304+
#endif // GPUCA_ALIGPUCODE
305+
301306
} // namespace tpc
302307
} // namespace o2
303308

Detectors/TPC/base/include/TPCBase/CalDet.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
#include <memory>
1515
#include <vector>
1616
#include <string>
17-
#include <boost/format.hpp>
18-
#include <boost/range/combine.hpp>
1917
#include <cassert>
2018

21-
#include <FairLogger.h>
22-
2319
#include "DataFormatsTPC/Defs.h"
2420
#include "TPCBase/Mapper.h"
2521
#include "TPCBase/ROC.h"
2622
#include "TPCBase/Sector.h"
2723
#include "TPCBase/CalArray.h"
2824

29-
using boost::format;
25+
#ifndef GPUCA_ALIGPUCODE
26+
#include <Framework/Logger.h>
27+
#include <boost/format.hpp>
28+
#include <boost/range/combine.hpp>
29+
#endif
3030

3131
namespace o2
3232
{
@@ -182,6 +182,8 @@ inline const T CalDet<T>::getValue(const CRU cru, const size_t row, const size_t
182182
return T{};
183183
}
184184

185+
#ifndef GPUCA_ALIGPUCODE // hide from GPU standalone compilation
186+
185187
//______________________________________________________________________________
186188
template <class T>
187189
inline const CalDet<T>& CalDet<T>::operator+=(const CalDet& other)
@@ -340,6 +342,8 @@ void CalDet<T>::initData()
340342
}
341343
}
342344

345+
#endif // GPUCA_ALIGPUCODE
346+
343347
using CalPad = CalDet<float>;
344348
} // namespace tpc
345349
} // namespace o2

0 commit comments

Comments
 (0)