CUDADataFormats
TrackingRecHit
src
TrackingRecHit2DHeterogeneous.cc
Go to the documentation of this file.
1
#include "
CUDADataFormats/TrackingRecHit/interface/TrackingRecHit2DHeterogeneous.h
"
2
#include "
HeterogeneousCore/CUDAUtilities/interface/copyAsync.h
"
3
#include "
HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h
"
4
#include "
HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h
"
5
#include "
HeterogeneousCore/CUDAUtilities/interface/host_unique_ptr.h
"
6
7
template
<>
8
cms::cuda::host::unique_ptr<float[]>
TrackingRecHit2DCUDA::localCoordToHostAsync
(cudaStream_t
stream
)
const
{
9
auto
ret
= cms::cuda::make_host_unique<float[]>(4 *
nHits
(),
stream
);
10
cms::cuda::copyAsync
(
ret
,
m_store32
, 4 *
nHits
(),
stream
);
11
return
ret
;
12
}
13
14
template
<>
15
cms::cuda::host::unique_ptr<uint32_t[]>
TrackingRecHit2DCUDA::hitsModuleStartToHostAsync
(cudaStream_t
stream
)
const
{
16
auto
ret
= cms::cuda::make_host_unique<uint32_t[]>(
gpuClustering::maxNumModules
+ 1,
stream
);
17
cudaCheck
(cudaMemcpyAsync(
18
ret
.get(),
m_hitsModuleStart
,
sizeof
(uint32_t) * (
gpuClustering::maxNumModules
+ 1), cudaMemcpyDefault,
stream
));
19
return
ret
;
20
}
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition:
runTheMatrix.py:542
TrackingRecHit2DHeterogeneous.h
cms::cuda::stream
cudaStream_t stream
Definition:
HistoContainer.h:57
device_unique_ptr.h
host_unique_ptr.h
TrackingRecHit2DHeterogeneous::m_hitsModuleStart
uint32_t const * m_hitsModuleStart
Definition:
TrackingRecHit2DHeterogeneous.h:58
gpuClustering::maxNumModules
constexpr uint16_t maxNumModules
Definition:
gpuClusteringConstants.h:29
cudaCheck.h
copyAsync.h
TrackingRecHit2DHeterogeneous::nHits
auto nHits() const
Definition:
TrackingRecHit2DHeterogeneous.h:32
TrackingRecHit2DHeterogeneous::hitsModuleStartToHostAsync
cms::cuda::host::unique_ptr< uint32_t[]> hitsModuleStartToHostAsync(cudaStream_t stream) const
Definition:
TrackingRecHit2DHeterogeneous.cc:15
cudaCheck
#define cudaCheck(ARG,...)
Definition:
cudaCheck.h:62
TrackingRecHit2DHeterogeneous::m_store32
unique_ptr< float[]> m_store32
Definition:
TrackingRecHit2DHeterogeneous.h:49
cms::cuda::host::unique_ptr
std::unique_ptr< T, impl::HostDeleter > unique_ptr
Definition:
host_unique_ptr.h:21
TrackingRecHit2DHeterogeneous::localCoordToHostAsync
cms::cuda::host::unique_ptr< float[]> localCoordToHostAsync(cudaStream_t stream) const
Definition:
TrackingRecHit2DHeterogeneous.cc:8
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition:
copyAsync.h:20
Generated for CMSSW Reference Manual by
1.8.16