CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions
ALPAKA_ACCELERATOR_NAMESPACE Namespace Reference

Namespaces

 detail
 
 device
 
 global
 
 portabletest
 
 stream
 

Classes

class  AlpakaESTestDataA
 
class  AlpakaService
 
class  EDMetadata
 
class  ESDeviceProduct
 
class  ESProducer
 
class  ProducerBase
 
class  ProducerBaseAdaptor
 
class  TestAlgo
 
class  TestAlgoKernel
 
class  TestAlpakaESProducerA
 
class  TestAlpakaESProducerB
 
class  TestAlpakaESProducerC
 
class  TestAlpakaESProducerD
 
class  TestAlpakaGlobalProducer
 
class  TestAlpakaProducer
 
class  TestAlpakaStreamProducer
 
class  TestAlpakaStreamSynchronizingProducer
 
class  TestHelperClass
 

Typedefs

using AlpakaESTestDataCDevice = PortableCollection< cms::alpakatest::AlpakaESTestSoAC >
 
using AlpakaESTestDataCHost = cms::alpakatest::AlpakaESTestDataCHost
 
using AlpakaESTestDataDDevice = PortableCollection< cms::alpakatest::AlpakaESTestSoAD >
 
using AlpakaESTestDataDHost = cms::alpakatest::AlpakaESTestDataDHost
 
template<typename T >
using PortableCollection = ::PortableDeviceCollection< T, Device >
 

Functions

AlpakaESTestDataDDevice testESAlgoAsync (Queue &queue, AlpakaESTestDataA const &dataA, cms::alpakatest::AlpakaESTestDataB< Device > const &dataB)
 

Typedef Documentation

◆ AlpakaESTestDataCDevice

Definition at line 32 of file AlpakaESTestData.h.

◆ AlpakaESTestDataCHost

Definition at line 31 of file AlpakaESTestData.h.

◆ AlpakaESTestDataDDevice

Definition at line 35 of file AlpakaESTestData.h.

◆ AlpakaESTestDataDHost

Definition at line 34 of file AlpakaESTestData.h.

◆ PortableCollection

template<typename T >
using ALPAKA_ACCELERATOR_NAMESPACE::PortableCollection = typedef ::PortableDeviceCollection<T, Device>

Definition at line 27 of file PortableCollection.h.

Function Documentation

◆ testESAlgoAsync()

AlpakaESTestDataDDevice ALPAKA_ACCELERATOR_NAMESPACE::testESAlgoAsync ( Queue &  queue,
AlpakaESTestDataA const &  dataA,
cms::alpakatest::AlpakaESTestDataB< Device > const &  dataB 
)

Definition at line 4 of file testESAlgoAsync.dev.cc.

References a, b, c, ALPAKA_ACCELERATOR_NAMESPACE::AlpakaESTestDataA::data(), cms::alpakatest::AlpakaESTestDataB< TDev >::data(), mps_fire::i, SiStripPI::min, createBeamHaloJobs::queue, runTheMatrix::ret, ALPAKA_ACCELERATOR_NAMESPACE::AlpakaESTestDataA::size(), cms::alpakatest::AlpakaESTestDataB< TDev >::size(), findQualityFiles::size, and gpuPixelDoublets::stride.

Referenced by ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaESProducerD::produce().

6  {
7  auto const size = std::min(dataA.size(), dataB.size());
9 
10  auto const& deviceProperties = alpaka::getAccDevProps<Acc1D>(alpaka::getDev(queue));
11  uint32_t maxThreadsPerBlock = deviceProperties.m_blockThreadExtentMax[0];
12 
13  uint32_t threadsPerBlock = maxThreadsPerBlock;
14  uint32_t blocksPerGrid = (size + threadsPerBlock - 1) / threadsPerBlock;
15  uint32_t elementsPerThread = 1;
16  auto workDiv = WorkDiv1D{blocksPerGrid, threadsPerBlock, elementsPerThread};
17 
18  alpaka::exec<Acc1D>(
19  queue,
20  workDiv,
21  [] ALPAKA_FN_ACC(Acc1D const& acc, int const* a, int const* b, AlpakaESTestDataDDevice::View c, int size) {
22  const int32_t thread = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0u];
23  const int32_t stride = alpaka::getWorkDiv<alpaka::Grid, alpaka::Threads>(acc)[0u];
24  for (auto i = thread; i < size; i += stride) {
25  c[i] = a[i] + b[i];
26  }
27  },
28  dataA.data(),
29  dataB.data(),
30  ret.view(),
31  size);
32 
33  return ret;
34  }
size
Write out results.
ret
prodAgent to be discontinued
WorkDiv< Dim1D > WorkDiv1D
Definition: config.h:31
PortableCollection< cms::alpakatest::AlpakaESTestSoAD > AlpakaESTestDataDDevice
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119