CMS 3D CMS Logo

Classes | Functions | Variables
cms::cudacompat Namespace Reference

Classes

struct  CPUTraits
 
struct  GPUTraits
 
struct  HostTraits
 

Functions

template<typename T >
T __ldg (T const *x)
 
void __syncthreads ()
 
bool __syncthreads_and (bool x)
 
bool __syncthreads_or (bool x)
 
void __threadfence ()
 
template<typename T1 , typename T2 >
T1 atomicAdd (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicAdd_block (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicAnd (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicAnd_block (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicCAS (T1 *address, T1 compare, T2 val)
 
template<typename T1 , typename T2 >
T1 atomicCAS_block (T1 *address, T1 compare, T2 val)
 
template<typename T1 , typename T2 >
T1 atomicInc (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicInc_block (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicMax (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicMax_block (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicMin (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicMin_block (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicOr (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicOr_block (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicSub (T1 *a, T2 b)
 
template<typename T1 , typename T2 >
T1 atomicSub_block (T1 *a, T2 b)
 

Variables

const dim3 blockDim = {1, 1, 1}
 
const dim3 blockIdx = {0, 0, 0}
 
const dim3 gridDim = {1, 1, 1}
 
const dim3 threadIdx = {0, 0, 0}
 

Function Documentation

◆ __ldg()

template<typename T >
T cms::cudacompat::__ldg ( T const *  x)
inline

◆ __syncthreads()

gpuVertexFinder::__syncthreads ( )
inline

◆ __syncthreads_and()

bool cms::cudacompat::__syncthreads_and ( bool  x)
inline

Definition at line 135 of file cudaCompat.h.

References x.

Referenced by gpuClustering::for().

135 { return x; }
float x

◆ __syncthreads_or()

bool cms::cudacompat::__syncthreads_or ( bool  x)
inline

Definition at line 134 of file cudaCompat.h.

References x.

134 { return x; }
float x

◆ __threadfence()

void cms::cudacompat::__threadfence ( )
inline

Definition at line 133 of file cudaCompat.h.

Referenced by GPUCACellT< TrackerTraits >::__attribute__().

133 {}

◆ atomicAdd()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicAdd ( T1 *  a,
T2  b 
)

Definition at line 61 of file cudaCompat.h.

References a, b, and runTheMatrix::ret.

Referenced by gpuPixelRecHits::__attribute__(), cms::cuda::AtomicPairCounter::__attribute__(), cms::cuda::OneToManyAssoc< I, NHISTS *NBINS+1, SIZE >::__attribute__(), cms::alpakatools::AtomicPairCounter::add(), cms::alpakatools::OneToManyAssocBase< I, ONES, SIZE >::add(), atomicAdd_block(), cms::alpakatools::OneToManyAssocBase< I, ONES, SIZE >::atomicIncrement(), cms::cuda::VecArray< T, maxSize >::emplace_back(), cms::cuda::SimpleVector< SiPixelErrorCompact >::emplace_back(), cms::alpakatools::SimpleVector< T >::emplace_back(), cms::alpakatools::VecArray< TrackerTraits >::emplace_back(), cms::cuda::SimpleVector< SiPixelErrorCompact >::extend(), cms::alpakatools::SimpleVector< T >::extend(), gpuPixelDoublets::for(), gpuVertexFinder::for(), gpuClustering::for(), for(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::for(), caHitNtupletGeneratorKernels::for(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::for(), ALPAKA_ACCELERATOR_NAMESPACE::hcalFastCluster_singleSeed(), caHitNtupletGeneratorKernels::if(), ALPAKA_ACCELERATOR_NAMESPACE::HGCalLayerClustersSoAAlgoKernelEnergy::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::raw::Kernel_unpack::operator()(), pixelClustering::ClusterChargeCut< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::Kernel_BLFastFit< N, TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::LoadTracks< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::pixelRecHits::GetHits< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::HGCalLayerClustersSoAAlgoKernelPositionByHits::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_checkOverflows< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::HGCalLayerClustersSoAAlgoKernelPositionByHits2::operator()(), cms::alpakatools::multiBlockPrefixScan< T >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::FindClus< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction::mahi::Kernel_prep1d_sameNumberOfSamples::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_doStatsForTracks< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_doStatsForHitInTracks< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_countSharedHit< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::SeedingTopoThresh::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::TopoClusterContraction::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::FillRhfIndex::operator()(), cms::cuda::VecArray< T, maxSize >::push_back(), cms::cuda::SimpleVector< SiPixelErrorCompact >::push_back(), cms::alpakatools::SimpleVector< T >::push_back(), cms::alpakatools::VecArray< TrackerTraits >::push_back(), cms::alpakatools::radixSortImpl(), cms::cuda::SimpleVector< SiPixelErrorCompact >::shrink(), cms::alpakatools::SimpleVector< T >::shrink(), and ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::sortByPt2().

61  {
62  auto ret = *a;
63  (*a) += b;
64  return ret;
65  }
ret
prodAgent to be discontinued
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicAdd_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicAdd_block ( T1 *  a,
T2  b 
)

Definition at line 68 of file cudaCompat.h.

References a, atomicAdd(), and b.

68  {
69  return atomicAdd(a, b);
70  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
T1 atomicAdd(T1 *a, T2 b)
Definition: cudaCompat.h:61

◆ atomicAnd()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicAnd ( T1 *  a,
T2  b 
)

Definition at line 109 of file cudaCompat.h.

References a, b, and runTheMatrix::ret.

Referenced by atomicAnd_block().

109  {
110  auto ret = *a;
111  (*a) &= b;
112  return ret;
113  }
ret
prodAgent to be discontinued
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicAnd_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicAnd_block ( T1 *  a,
T2  b 
)

Definition at line 116 of file cudaCompat.h.

References a, atomicAnd(), and b.

116  {
117  return atomicAnd(a, b);
118  }
T1 atomicAnd(T1 *a, T2 b)
Definition: cudaCompat.h:109
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicCAS()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicCAS ( T1 *  address,
T1  compare,
T2  val 
)

Definition at line 36 of file cudaCompat.h.

References heppy_batch::val.

Referenced by GPUCACellT< TrackerTraits >::__attribute__(), atomicCAS_block(), atomicMaxF(), atomicMaxPair(), and gpuClustering::pixelStatus::promote().

36  {
37  T1 old = *address;
38  *address = old == compare ? val : old;
39  return old;
40  }

◆ atomicCAS_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicCAS_block ( T1 *  address,
T1  compare,
T2  val 
)

Definition at line 43 of file cudaCompat.h.

References atomicCAS(), and heppy_batch::val.

43  {
44  return atomicCAS(address, compare, val);
45  }
T1 atomicCAS(T1 *address, T1 compare, T2 val)
Definition: cudaCompat.h:36

◆ atomicInc()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicInc ( T1 *  a,
T2  b 
)

◆ atomicInc_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicInc_block ( T1 *  a,
T2  b 
)

Definition at line 56 of file cudaCompat.h.

References a, atomicInc(), and b.

56  {
57  return atomicInc(a, b);
58  }
T1 atomicInc(T1 *a, T2 b)
Definition: cudaCompat.h:48
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicMax()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicMax ( T1 *  a,
T2  b 
)

Definition at line 97 of file cudaCompat.h.

References a, b, WZElectronSkims53X_cff::max, and runTheMatrix::ret.

Referenced by gpuPixelRecHits::__attribute__(), atomicMax_block(), ALPAKA_ACCELERATOR_NAMESPACE::pixelRecHits::GetHits< TrackerTraits >::operator()(), and cms::alpakatools::radixSortImpl().

97  {
98  auto ret = *a;
99  *a = std::max(*a, T1(b));
100  return ret;
101  }
ret
prodAgent to be discontinued
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicMax_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicMax_block ( T1 *  a,
T2  b 
)

Definition at line 104 of file cudaCompat.h.

References a, atomicMax(), and b.

104  {
105  return atomicMax(a, b);
106  }
T1 atomicMax(T1 *a, T2 b)
Definition: cudaCompat.h:97
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicMin()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicMin ( T1 *  a,
T2  b 
)

◆ atomicMin_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicMin_block ( T1 *  a,
T2  b 
)

Definition at line 92 of file cudaCompat.h.

References a, atomicMin(), and b.

92  {
93  return atomicMin(a, b);
94  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
T1 atomicMin(T1 *a, T2 b)
Definition: cudaCompat.h:85

◆ atomicOr()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicOr ( T1 *  a,
T2  b 
)

Definition at line 121 of file cudaCompat.h.

References a, b, and runTheMatrix::ret.

Referenced by atomicOr_block().

121  {
122  auto ret = *a;
123  (*a) |= b;
124  return ret;
125  }
ret
prodAgent to be discontinued
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ atomicOr_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicOr_block ( T1 *  a,
T2  b 
)

Definition at line 128 of file cudaCompat.h.

References a, atomicOr(), and b.

128  {
129  return atomicOr(a, b);
130  }
double b
Definition: hdecay.h:120
T1 atomicOr(T1 *a, T2 b)
Definition: cudaCompat.h:121
double a
Definition: hdecay.h:121

◆ atomicSub()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicSub ( T1 *  a,
T2  b 
)

◆ atomicSub_block()

template<typename T1 , typename T2 >
T1 cms::cudacompat::atomicSub_block ( T1 *  a,
T2  b 
)

Definition at line 80 of file cudaCompat.h.

References a, atomicSub(), and b.

80  {
81  return atomicSub(a, b);
82  }
T1 atomicSub(T1 *a, T2 b)
Definition: cudaCompat.h:73
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

Variable Documentation

◆ blockDim

const dim3 cms::cudacompat::blockDim = {1, 1, 1}

◆ blockIdx

const dim3 cms::cudacompat::blockIdx = {0, 0, 0}

◆ gridDim

const dim3 cms::cudacompat::gridDim = {1, 1, 1}

◆ threadIdx

const dim3 cms::cudacompat::threadIdx = {0, 0, 0}