9 TTDTC::TTDTC(
int numRegions,
int numOverlappingRegions,
int numDTCsPerRegion)
10 : numRegions_(numRegions),
11 numOverlappingRegions_(numOverlappingRegions),
12 numDTCsPerRegion_(numDTCsPerRegion),
13 numDTCsPerTFP_(numOverlappingRegions * numDTCsPerRegion),
14 regions_(numRegions_),
15 channels_(numDTCsPerTFP_),
16 streams_(numRegions_ * numDTCsPerTFP_) {
25 const bool oorRegion = dtcRegion >=
numRegions_ || dtcRegion < 0;
28 if (oorRegion || oorBoard || oorChannel) {
33 <<
"(" << dtcRegion <<
") is out of range 0 to " <<
numRegions_ - 1 <<
".";
49 const bool oorRegion = tfpRegion >=
numRegions_ || tfpRegion < 0;
50 const bool oorChannel = tfpChannel >=
numDTCsPerTFP_ || tfpChannel < 0;
51 if (oorRegion || oorChannel) {
55 exception <<
"Requested Processing Region " 56 <<
"(" << tfpRegion <<
") is out of range 0 to " <<
numRegions_ - 1 <<
".";
59 <<
"(" << tfpChannel <<
") is out of range 0 to " <<
numDTCsPerTFP_ - 1 <<
".";
73 auto stubs = [](
int& sum,
const Frame&
frame) {
return sum +=
frame.first.isNonnull(); };
82 auto gaps = [](
int& sum,
const Frame&
frame) {
return sum +=
frame.first.isNull(); };
90 int TTDTC::index(
int dtcRegion,
int dtcBoard,
int dtcChannel)
const {
98 const int dtcRegion = tfpRegion - dtcChannel >= 0 ? tfpRegion - dtcChannel : tfpRegion - dtcChannel +
numRegions_;
99 return index(dtcRegion, dtcBoard, dtcChannel);
std::vector< int > regions_
std::vector< int > channels_
std::vector< Frame > Stream
int numOverlappingRegions_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
const Stream & stream(int tfpRegion, int tfpChannel) const
std::pair< TTStubRef, BV > Frame
void setStream(int dtcRegion, int dtcBoard, int dtcChannel, const Stream &stream)
int index(int dtcRegion, int dtcBoard, int dtcChannel) const