CMS 3D CMS Logo

CAHitNtupletGeneratorKernelsAlloc.h
Go to the documentation of this file.
2 
4 
5 template <>
6 #ifdef __CUDACC__
8 #else
10 #endif
11  // ALLOCATIONS FOR THE INTERMEDIATE RESULTS (STAYS ON WORKER)
14 
15  device_theCellNeighbors_ = Traits::template make_unique<caConstants::CellNeighborsVector>(stream);
16  device_theCellTracks_ = Traits::template make_unique<caConstants::CellTracksVector>(stream);
17 
18  device_hitToTuple_ = Traits::template make_unique<HitToTuple>(stream);
19 
20  device_tupleMultiplicity_ = Traits::template make_unique<TupleMultiplicity>(stream);
21 
22  device_storage_ = Traits::template make_unique<cms::cuda::AtomicPairCounter::c_type[]>(3, stream);
23 
26  device_nCells_ = (uint32_t*)(device_storage_.get() + 2);
27 
29  cudaCheck(cudaMemsetAsync(device_nCells_, 0, sizeof(uint32_t), stream));
30  } else {
31  *device_nCells_ = 0;
32  }
33  cms::cuda::launchZero(device_tupleMultiplicity_.get(), stream);
34  cms::cuda::launchZero(device_hitToTuple_.get(), stream); // we may wish to keep it in the edm...
35 }
CAHitNtupletGeneratorKernels::device_hitTuple_apc_
cms::cuda::AtomicPairCounter * device_hitTuple_apc_
Definition: CAHitNtupletGeneratorKernels.h:205
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
CAHitNtupletGeneratorKernels.h
CAHitNtupletGeneratorKernels::allocateOnGPU
void allocateOnGPU(cudaStream_t stream)
Definition: CAHitNtupletGeneratorKernelsAlloc.h:9
CAHitNtupletGeneratorKernels::device_theCellTracks_
unique_ptr< caConstants::CellTracksVector > device_theCellTracks_
Definition: CAHitNtupletGeneratorKernels.h:195
CAHitNtupletGeneratorKernels::device_theCellNeighbors_
unique_ptr< caConstants::CellNeighborsVector > device_theCellNeighbors_
Definition: CAHitNtupletGeneratorKernels.h:193
CAHitNtupletGeneratorKernels::device_nCells_
uint32_t * device_nCells_
Definition: CAHitNtupletGeneratorKernels.h:200
CAHitNtupletGeneratorKernels::device_tupleMultiplicity_
unique_ptr< TupleMultiplicity > device_tupleMultiplicity_
Definition: CAHitNtupletGeneratorKernels.h:207
CAHitNtupletGeneratorKernels::device_hitToTuple_apc_
cms::cuda::AtomicPairCounter * device_hitToTuple_apc_
Definition: CAHitNtupletGeneratorKernels.h:203
CAHitNtupletGeneratorKernels::device_hitToTuple_
unique_ptr< HitToTuple > device_hitToTuple_
Definition: CAHitNtupletGeneratorKernels.h:202
CAHitNtupletGeneratorKernels::device_storage_
unique_ptr< cms::cuda::AtomicPairCounter::c_type[]> device_storage_
Definition: CAHitNtupletGeneratorKernels.h:209
cms::cuda::AtomicPairCounter
Definition: AtomicPairCounter.h:11
cudaCheck.h
svgfig.template
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
cudaCheck
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:62
relativeConstraints.value
value
Definition: relativeConstraints.py:53