Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifndef GPUCA_STANDALONE
#include <Framework/Traits.h>
#endif
#include <span>

class TTree;

Expand Down Expand Up @@ -132,7 +133,7 @@ template <typename TruthElement>
class ConstMCTruthContainerView
{
public:
ConstMCTruthContainerView(gsl::span<const char> const bufferview) : mStorage(bufferview){};
ConstMCTruthContainerView(std::span<const char> const bufferview) : mStorage(bufferview.data(), bufferview.size()) {};
ConstMCTruthContainerView(ConstMCTruthContainer<TruthElement> const& cont) : mStorage(gsl::span<const char>(cont)){};
// be explicit that we want nullptr / 0 for an uninitialized container (needs (void)0 to avoid false codechecker warning)
ConstMCTruthContainerView() : mStorage{nullptr, static_cast<gsl::span<const char>::size_type>(0)}
Expand Down
8 changes: 4 additions & 4 deletions Detectors/CPV/simulation/src/RawWriter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ bool RawWriter::processOrbit(const gsl::span<o2::cpv::Digit> digitsbranch, const
}
}
mRawWriter->addData(links[iLink].feeId, links[iLink].cruId, links[iLink].linkId, links[iLink].endPointId, currentIR,
gsl::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);
std::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);
mPayload[iLink].clear();
cpvWordCounter[iLink] = 0;
cpvWordCounterBeforeCPVTrailer[iLink] = 0;
Expand Down Expand Up @@ -262,7 +262,7 @@ bool RawWriter::processOrbit(const gsl::span<o2::cpv::Digit> digitsbranch, const
}
}
mRawWriter->addData(links[iLink].feeId, links[iLink].cruId, links[iLink].linkId, links[iLink].endPointId, currentIR,
gsl::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);
std::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);

mPayload[iLink].clear();
cpvWordCounter[iLink] = 0;
Expand Down Expand Up @@ -322,7 +322,7 @@ bool RawWriter::processOrbit(const gsl::span<o2::cpv::Digit> digitsbranch, const
}
}
mRawWriter->addData(links[iLink].feeId, links[iLink].cruId, links[iLink].linkId, links[iLink].endPointId, currentIR,
gsl::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);
std::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);

mPayload[iLink].clear();
cpvWordCounter[iLink] = 0;
Expand Down Expand Up @@ -373,7 +373,7 @@ bool RawWriter::processOrbit(const gsl::span<o2::cpv::Digit> digitsbranch, const
}
}
mRawWriter->addData(links[iLink].feeId, links[iLink].cruId, links[iLink].linkId, links[iLink].endPointId,
trgs.back().getBCData(), gsl::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);
trgs.back().getBCData(), std::span<char>(mPayload[iLink].data(), mPayload[iLink].size()), preformatted);
mPayload[iLink].clear();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "GPUTPCGMMergedTrackHit.h"
#include "DataFormatsITS/TrackITS.h"
#include <set>
#include <gsl/span>
#include <vector>

namespace o2
Expand Down
2 changes: 1 addition & 1 deletion Detectors/HMPID/simulation/src/HmpidCoder2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void HmpidCoder2::writePaginatedEvent(uint32_t orbit, uint16_t bc)
ReadOut::LnkId(eq),
0,
{bc, orbit},
gsl::span<char>(reinterpret_cast<char*>(ptrStartEquipment),
std::span<char>(reinterpret_cast<char*>(ptrStartEquipment),
EventSize * sizeof(uint32_t)),
false,
0,
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/common/simulation/src/MC2RawEncoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void MC2RawEncoder<Mapping>::fillGBTLinks(RUDecodeData& ru)
LOGF(debug, "Filled %s with %d GBT words", link->describe(), nPayLoadWordsNeeded + 3);

// flush to writer
mWriter.addData(link->feeID, link->cruID, link->idInCRU, link->endPointID, mCurrIR, gsl::span((char*)link->data.data(), link->data.getSize()));
mWriter.addData(link->feeID, link->cruID, link->idInCRU, link->endPointID, mCurrIR, std::span((char*)link->data.data(), link->data.getSize()));
link->data.clear();
//
} // loop over links of RU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void paginate(o2::raw::RawFileWriter& rawFileWriter,
filled[o2::InteractionRecord{h.bc, h.orbit}].insert(li.value());
rawFileWriter.addData(rdhFromLinkInfo(li.value()),
{h.bc, h.orbit},
gsl::span<char>(const_cast<char*>(reinterpret_cast<const char*>(&b.payload[0])),
std::span<char>(const_cast<char*>(reinterpret_cast<const char*>(&b.payload[0])),
b.payload.size()));
}

Expand Down
5 changes: 3 additions & 2 deletions Detectors/Raw/include/DetectorsRaw/RawFileWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/// @brief Utility class to write detectors data to (multiple) raw data file(s) respecting CRU format

#include <gsl/span>
#include <span>
#include <unordered_map>
#include <vector>
#include <map>
Expand Down Expand Up @@ -205,10 +206,10 @@ class RawFileWriter
}

void addData(uint16_t feeid, uint16_t cru, uint8_t lnk, uint8_t endpoint, const IR& ir,
const gsl::span<char> data, bool preformatted = false, uint32_t trigger = 0, uint32_t detField = 0);
const std::span<char> data, bool preformatted = false, uint32_t trigger = 0, uint32_t detField = 0);

template <typename H>
void addData(const H& rdh, const IR& ir, const gsl::span<char> data, bool preformatted = false, uint32_t trigger = 0)
void addData(const H& rdh, const IR& ir, const std::span<char> data, bool preformatted = false, uint32_t trigger = 0)
{
RDHAny::sanityCheckLoose<H>();
addData(RDHUtils::getFEEID(rdh), RDHUtils::getCRUID(rdh), RDHUtils::getLinkID(rdh), RDHUtils::getEndPointID(rdh), ir, data, trigger);
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Raw/src/RawFileWriter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ RawFileWriter::LinkData& RawFileWriter::registerLink(uint16_t fee, uint16_t cru,
}

//_____________________________________________________________________
void RawFileWriter::addData(uint16_t feeid, uint16_t cru, uint8_t lnk, uint8_t endpoint, const IR& ir, const gsl::span<char> data, bool preformatted, uint32_t trigger, uint32_t detField)
void RawFileWriter::addData(uint16_t feeid, uint16_t cru, uint8_t lnk, uint8_t endpoint, const IR& ir, const std::span<char> data, bool preformatted, uint32_t trigger, uint32_t detField)
{
// add payload to relevant links
auto sspec = RDHUtils::getSubSpec(cru, lnk, endpoint, feeid);
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TOF/reconstruction/src/Encoder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bool Encoder::flush(int icrate)
if (nbyte) {
if (mCrateOn[icrate]) {
//printf("flush crate %d -- byte = %d -- orbit = %d, bc = %d\n",icrate, nbyte, mIR.orbit, mIR.bc);
mFileWriter.addData(Geo::getFEEid(icrate), Geo::getCRUid(icrate), Geo::getCRUlink(icrate), Geo::getCRUendpoint(icrate), mIR, gsl::span(mBuffer[icrate], nbyte));
mFileWriter.addData(Geo::getFEEid(icrate), Geo::getCRUid(icrate), Geo::getCRUlink(icrate), Geo::getCRUendpoint(icrate), mIR, std::span(mBuffer[icrate], nbyte));
}
mIntegratedAllBytes += nbyte;
}
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/workflow/src/ClusterDecoderRawSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ DataProcessorSpec getClusterDecoderRawSpec(bool sendMC)
std::vector<ConstMCLabelContainerView> mcinCopiesFlatView;
ConstMCLabelContainerView mcin;
if (DataRefUtils::isValid(mclabelref)) {
mcin = pc.inputs().get<gsl::span<char>>(mclabelref);
mcin = pc.inputs().get<std::span<char>>(mclabelref);
mcinCopiesFlat.resize(nPages);
mcinCopiesFlatView.reserve(nPages);
if (verbosity > 0) {
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/workflow/src/ClustererSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ DataProcessorSpec getClustererSpec(bool sendMC)
}
ConstMCLabelContainerView inMCLabels;
if (DataRefUtils::isValid(mclabelref)) {
inMCLabels = pc.inputs().get<gsl::span<char>>(mclabelref);
inMCLabels = pc.inputs().get<std::span<char>>(mclabelref);
}
auto inDigits = pc.inputs().get<gsl::span<o2::tpc::Digit>>(dataref);
if (verbosity > 0 && inMCLabels.getBuffer().size()) {
Expand Down
11 changes: 8 additions & 3 deletions Detectors/TPC/workflow/src/ZSSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <iomanip>
#include <stdexcept>
#include <array>
#include <span>
#include <unistd.h>
#include <atomic>
#include "GPUO2InterfaceUtils.h"
Expand Down Expand Up @@ -62,7 +63,7 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& tpcSectors, bool outR
std::string processorName = "tpc-zsEncoder";
constexpr static size_t NSectors = o2::tpc::Sector::MAXSECTOR;
constexpr static size_t NEndpoints = o2::gpu::GPUTrackingInOutZS::NENDPOINTS;
using DigitArray = std::array<gsl::span<const o2::tpc::Digit>, NSectors>;
using DigitArray = std::array<std::span<const o2::tpc::Digit>, NSectors>;

struct ProcessAttributes {
std::unique_ptr<uint64_t[]> zsoutput;
Expand Down Expand Up @@ -112,9 +113,13 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& tpcSectors, bool outR
}

const auto& inputs = getWorkflowTPCInput(pc, 0, false, false, tpcSectorMask, true);
DigitArray inputDigits;
for (size_t i = 0; i < NSectors; i++) {
inputDigits[i] = {inputs->inputDigits[i].data(), inputs->inputDigits[i].size()};
}
sizes.resize(NSectors * NEndpoints);
o2::InteractionRecord ir{0, pc.services().get<o2::framework::TimingInfo>().firstTForbit};
o2::gpu::GPUO2InterfaceUtils::RunZSEncoder<DigitArray>(inputs->inputDigits, &zsoutput, sizes.data(), nullptr, &ir, processAttributes->config, 4, verify, false, digitsFilter);
o2::gpu::GPUO2InterfaceUtils::RunZSEncoder<DigitArray>(inputDigits, &zsoutput, sizes.data(), nullptr, &ir, processAttributes->config, 4, verify, false, digitsFilter);
ZeroSuppressedContainer8kb* page = reinterpret_cast<ZeroSuppressedContainer8kb*>(zsoutput.get());
unsigned int offset = 0;
for (unsigned int i = 0; i < NSectors; i++) {
Expand Down Expand Up @@ -167,7 +172,7 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& tpcSectors, bool outR
writer.useCaching();
}
ir = o2::raw::HBFUtils::Instance().getFirstSampledTFIR();
o2::gpu::GPUO2InterfaceUtils::RunZSEncoder(inputs->inputDigits, nullptr, nullptr, &writer, &ir, processAttributes->config, 4, false, false, digitsFilter);
o2::gpu::GPUO2InterfaceUtils::RunZSEncoder(inputDigits, nullptr, nullptr, &writer, &ir, processAttributes->config, 4, false, false, digitsFilter);
writer.writeConfFile("TPC", "RAWDATA", fmt::format("{}tpcraw.cfg", outDir));
}
zsoutput.reset(nullptr);
Expand Down
3 changes: 2 additions & 1 deletion Detectors/TPC/workflow/src/convertDigitsToRawZS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string_view>
#include <memory>
#include <vector>
#include <span>
#include <fmt/format.h>
#include <filesystem>
#include "TFile.h"
Expand Down Expand Up @@ -53,7 +54,7 @@ using o2::MCCompLabel;

constexpr static size_t NSectors = o2::tpc::Sector::MAXSECTOR;
constexpr static size_t NEndpoints = o2::gpu::GPUTrackingInOutZS::NENDPOINTS;
using DigitArray = std::array<gsl::span<const o2::tpc::Digit>, Sector::MAXSECTOR>;
using DigitArray = std::array<std::span<const o2::tpc::Digit>, Sector::MAXSECTOR>;

static constexpr const char* CRU_FLPS[361] = {
"alio2-cr1-flp070", "alio2-cr1-flp069", "alio2-cr1-flp070", "alio2-cr1-flp069", "alio2-cr1-flp072", "alio2-cr1-flp071", "alio2-cr1-flp072", "alio2-cr1-flp071", "alio2-cr1-flp072", "alio2-cr1-flp071", "alio2-cr1-flp002", "alio2-cr1-flp001", "alio2-cr1-flp002", "alio2-cr1-flp001", "alio2-cr1-flp004", "alio2-cr1-flp003", "alio2-cr1-flp004", "alio2-cr1-flp003",
Expand Down
4 changes: 2 additions & 2 deletions Framework/Core/include/Framework/InputRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ class InputRecord
// implementation (f)
} else if constexpr (is_span<T>::value) {
// substitution for span of messageable objects
// FIXME: there will be std::span in C++20
static_assert(is_messageable<typename T::value_type>::value, "span can only be created for messageable types");
auto header = DataRefUtils::getHeader<header::DataHeader*>(ref);
assert(header);
Expand All @@ -318,7 +317,8 @@ class InputRecord
" payload size " + std::to_string(payloadSize))
.c_str());
}
return gsl::span<ValueT const>(reinterpret_cast<ValueT const*>(ref.payload), payloadSize / sizeof(ValueT));
using SpanT = std::conditional_t<std::is_same_v<T, std::span<ValueT>>, std::span<ValueT const>, gsl::span<ValueT const>>;
return SpanT(reinterpret_cast<ValueT const*>(ref.payload), payloadSize / sizeof(ValueT));

// implementation (g)
} else if constexpr (is_container<T>::value) {
Expand Down
6 changes: 5 additions & 1 deletion Framework/Core/include/Framework/TypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "Framework/Traits.h"

#include <gsl/gsl>
#include <span>

namespace o2::framework
{
Expand Down Expand Up @@ -60,6 +61,9 @@ struct is_messageable : std::conditional<(std::is_trivially_copyable<T>::value |
template <typename T>
struct is_messageable<gsl::span<T>> : std::false_type {
};
template <typename T>
struct is_messageable<std::span<T>> : std::false_type {
};

// Detect a container by checking on the container properties
// this is the default trait implementation inheriting from false_type
Expand Down Expand Up @@ -107,7 +111,7 @@ template <typename T, typename _ = void>
struct is_span : std::false_type {
};
template <typename T>
struct is_span<T, std::conditional_t<false, typename T::value_type, void>> : std::is_same<gsl::span<typename T::value_type>, T> {
struct is_span<T, std::conditional_t<false, typename T::value_type, void>> : std::bool_constant<std::is_same_v<gsl::span<typename T::value_type>, T> || std::is_same_v<std::span<typename T::value_type>, T>> {
};

// Detect whether a class has a ROOT dictionary
Expand Down
3 changes: 3 additions & 0 deletions Framework/Core/test/test_TypeTraits.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ TEST_CASE("TestIsSpan")
gsl::span<int> a;
int b;
std::vector<char> c;
std::span<int> d;
REQUIRE(is_span<decltype(a)>::value == true);
REQUIRE(is_span<decltype(b)>::value == false);
REQUIRE(is_span<decltype(c)>::value == false);
REQUIRE(is_span<decltype(d)>::value == true);
REQUIRE(is_messageable<decltype(d)>::value == false);
}

template <typename A>
Expand Down
7 changes: 4 additions & 3 deletions GPU/GPUTracking/Base/GPUReconstructionConvert.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "GPULogging.h"
#include <algorithm>
#include <vector>
#include <span>

#include "clusterFinderDefs.h"
#include "DataFormatsTPC/ZeroSuppression.h"
Expand Down Expand Up @@ -208,7 +209,7 @@ inline void zsEncoder::ZSstreamOut(uint16_t* bufIn, uint32_t& lenIn, uint8_t* bu
static inline auto ZSEncoderGetDigits(const GPUTrackingInOutDigits& in, int32_t i) { return in.tpcDigits[i]; }
static inline auto ZSEncoderGetNDigits(const GPUTrackingInOutDigits& in, int32_t i) { return in.nTPCDigits[i]; }
#ifndef GPUCA_STANDALONE
using DigitArray = std::array<gsl::span<const o2::tpc::Digit>, o2::tpc::Sector::MAXSECTOR>;
using DigitArray = std::array<std::span<const o2::tpc::Digit>, o2::tpc::Sector::MAXSECTOR>;
static inline auto ZSEncoderGetDigits(const DigitArray& in, int32_t i) { return in[i].data(); }
static inline auto ZSEncoderGetNDigits(const DigitArray& in, int32_t i) { return in[i].size(); }
#endif
Expand Down Expand Up @@ -1142,7 +1143,7 @@ inline uint32_t zsEncoderRun<T>::run(std::vector<zsPage>* buffer, std::vector<o2
size = CAMath::nextMultipleOf<o2::raw::RDHUtils::GBTWord128>(size);
#ifndef GPUCA_STANDALONE
if (raw) {
raw->addData(rawfeeid, rawcru, 0, rawendpoint, *ir + hbf * o2::constants::lhc::LHCMaxBunches, gsl::span<char>((char*)page + sizeof(o2::header::RAWDataHeader), (char*)page + size), true, 0, 2);
raw->addData(rawfeeid, rawcru, 0, rawendpoint, *ir + hbf * o2::constants::lhc::LHCMaxBunches, std::span<char>((char*)page + sizeof(o2::header::RAWDataHeader), (char*)page + size), true, 0, 2);
maxhbf = std::max<int32_t>(maxhbf, hbf);
minhbf = std::min<int32_t>(minhbf, hbf);
} else
Expand Down Expand Up @@ -1222,7 +1223,7 @@ inline uint32_t zsEncoderRun<T>::run(std::vector<zsPage>* buffer, std::vector<o2
#ifndef GPUCA_STANDALONE
if (iSector == 0) {
for (int32_t i = minhbf; i <= maxhbf; i++) {
raw->addData(46208, 360, rdh_utils::SACLinkID, 0, *ir + i * o2::constants::lhc::LHCMaxBunches, gsl::span<char>((char*)&singleBuffer, (char*)&singleBuffer), true, 0, 4);
raw->addData(46208, 360, rdh_utils::SACLinkID, 0, *ir + i * o2::constants::lhc::LHCMaxBunches, std::span<char>((char*)&singleBuffer, (char*)&singleBuffer), true, 0, 4);
}
}
#endif
Expand Down
10 changes: 5 additions & 5 deletions GPU/GPUTracking/Global/GPUChainTrackingIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
#include "CalibdEdxContainer.h"

#include "TPCFastTransformPOD.h"

using namespace o2::gpu;

#include "GPUO2DataTypes.h"

#include <span>

using namespace o2::gpu;
using namespace o2::tpc;
using namespace o2::trd;
using namespace o2::dataformats;
Expand Down Expand Up @@ -195,7 +195,7 @@ int32_t GPUChainTracking::ReadData(const char* filename)
mIOPtrs.clustersNative = mIOMem.clusterNativeAccess.get();
std::pair<const char*, size_t> tmp = {nullptr, 0};
if (ReadData(fp, &tmp.first, &tmp.second, &mIOMem.clusterNativeMC, InOutPointerType::CLUSTER_NATIVE_MC)) {
mIOMem.clusterNativeMCView = std::make_unique<ConstMCLabelContainerView>(gsl::span<const char>(tmp.first, tmp.first + tmp.second));
mIOMem.clusterNativeMCView = std::make_unique<ConstMCLabelContainerView>(std::span<const char>(tmp.first, tmp.first + tmp.second));
mIOMem.clusterNativeAccess->clustersMCTruth = mIOMem.clusterNativeMCView.get();
}
}
Expand All @@ -209,7 +209,7 @@ int32_t GPUChainTracking::ReadData(const char* filename)
mIOMem.tpcDigitMCView.reset(new ConstMCLabelContainerView[NSECTORS]);
for (uint32_t i = 0; i < NSECTORS; i++) {
if (sizes[i]) {
mIOMem.tpcDigitMCView.get()[i] = gsl::span<const char>(ptrs[i], ptrs[i] + sizes[i]);
mIOMem.tpcDigitMCView.get()[i] = std::span<const char>(ptrs[i], ptrs[i] + sizes[i]);
mIOMem.tpcDigitMCMap->v[i] = mIOMem.tpcDigitMCView.get() + i;
} else {
mIOMem.tpcDigitMCMap->v[i] = nullptr;
Expand Down
1 change: 0 additions & 1 deletion GPU/GPUTracking/Interface/GPUO2InterfaceConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <array>
#include <vector>
#include <functional>
#include <gsl/gsl> // TODO: Get rid of gsl

class TH1F;
class TH1D;
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Interface/GPUO2InterfaceRefit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using namespace o2::gpu;
using namespace o2::tpc;

void GPUO2InterfaceRefit::fillSharedClustersAndOccupancyMap(const ClusterNativeAccess* cl, const gsl::span<const TrackTPC> trks, const TPCClRefElem* trackRef, uint8_t* shmap, uint32_t* ocmap, uint32_t nHbfPerTf, const GPUParam* param)
void GPUO2InterfaceRefit::fillSharedClustersAndOccupancyMap(const ClusterNativeAccess* cl, const std::span<const TrackTPC> trks, const TPCClRefElem* trackRef, uint8_t* shmap, uint32_t* ocmap, uint32_t nHbfPerTf, const GPUParam* param)
{
if (!cl || (!shmap && cl->nClustersTotal > 0)) {
throw std::runtime_error("Must provide clusters access and preallocated buffer for shared map");
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Interface/GPUO2InterfaceRefit.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <memory>
#include <vector>
#include <gsl/span>
#include <span>

namespace o2::base
{
Expand Down Expand Up @@ -79,7 +79,7 @@ class GPUO2InterfaceRefit
// If the param object / default object requires an occupancy map, an occupancy map ptr and nHbfPerTf value must be provided.
// You can use the function fillOccupancyMapGetSize(...) to get the required size of the occupancy map. If 0 is returned, no map is required.
// Providing only the shmap ptr but no ocmap ptr will create only the shared map, but no occupancy map.
static void fillSharedClustersAndOccupancyMap(const o2::tpc::ClusterNativeAccess* cl, const gsl::span<const o2::tpc::TrackTPC> trks, const o2::tpc::TPCClRefElem* trackRef, uint8_t* shmap, uint32_t* ocmap = nullptr, uint32_t nHbfPerTf = 0, const GPUParam* param = nullptr);
static void fillSharedClustersAndOccupancyMap(const o2::tpc::ClusterNativeAccess* cl, const std::span<const o2::tpc::TrackTPC> trks, const o2::tpc::TPCClRefElem* trackRef, uint8_t* shmap, uint32_t* ocmap = nullptr, uint32_t nHbfPerTf = 0, const GPUParam* param = nullptr);
static size_t fillOccupancyMapGetSize(uint32_t nHbfPerTf, const GPUParam* param = nullptr);

private:
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Interface/GPUO2InterfaceUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#include "TPCBase/RDHUtils.h"
#include "DataFormatsTPC/ZeroSuppression.h"
#include "GPUTPCClusterOccupancyMap.h"
#include <gsl/span>
#include <span>

using namespace o2::gpu;

using DigitArray = std::array<gsl::span<const o2::tpc::Digit>, o2::tpc::Sector::MAXSECTOR>;
using DigitArray = std::array<std::span<const o2::tpc::Digit>, o2::tpc::Sector::MAXSECTOR>;

std::unique_ptr<TPCPadGainCalib> GPUO2InterfaceUtils::getPadGainCalibDefault()
{
Expand Down
Loading