10 TTDTC::TTDTC(
int numRegions,
int numOverlappingRegions,
int numDTCsPerRegion)
11 : numRegions_(numRegions),
12 numOverlappingRegions_(numOverlappingRegions),
13 numDTCsPerRegion_(numDTCsPerRegion),
14 numDTCsPerTFP_(numOverlappingRegions * numDTCsPerRegion),
15 regions_(numRegions_),
16 channels_(numDTCsPerTFP_),
17 streams_(numRegions_ * numDTCsPerTFP_) {
26 const bool oorRegion = dtcRegion >=
numRegions_ || dtcRegion < 0;
29 if (oorRegion || oorBoard || oorChannel) {
34 <<
"(" << dtcRegion <<
") is out of range 0 to " <<
numRegions_ - 1 <<
".";
50 const bool oorRegion = tfpRegion >=
numRegions_ || tfpRegion < 0;
51 const bool oorChannel = tfpChannel >=
numDTCsPerTFP_ || tfpChannel < 0;
52 if (oorRegion || oorChannel) {
56 exception <<
"Requested Processing Region " 57 <<
"(" << tfpRegion <<
") is out of range 0 to " <<
numRegions_ - 1 <<
".";
60 <<
"(" << tfpChannel <<
") is out of range 0 to " <<
numDTCsPerTFP_ - 1 <<
".";
91 int TTDTC::index(
int dtcRegion,
int dtcBoard,
int dtcChannel)
const {
99 const int dtcRegion = tfpRegion - dtcChannel >= 0 ? tfpRegion - dtcChannel : tfpRegion - dtcChannel +
numRegions_;
100 return index(dtcRegion, dtcBoard, dtcChannel);
void setStream(int dtcRegion, int dtcBoard, int dtcChannel, const tt::StreamStub &stream)
std::vector< int > regions_
std::pair< TTStubRef, Frame > FrameStub
std::vector< FrameStub > StreamStub
std::vector< int > channels_
int numOverlappingRegions_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
int index(int dtcRegion, int dtcBoard, int dtcChannel) const
const tt::StreamStub & stream(int tfpRegion, int tfpChannel) const