CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions
ALPAKA_ACCELERATOR_NAMESPACE Namespace Reference

Namespaces

 detail
 
 device
 
 global
 
 portabletest
 
 stream
 

Classes

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  TestAlpakaGlobalProducerOffset
 
class  TestAlpakaProducer
 
class  TestAlpakaStreamProducer
 
class  TestAlpakaStreamSynchronizingProducer
 
class  TestHelperClass
 

Typedefs

using AlpakaESTestDataADevice = PortableCollection< cms::alpakatest::AlpakaESTestSoAA >
 
using AlpakaESTestDataAHost = cms::alpakatest::AlpakaESTestDataAHost
 
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, AlpakaESTestDataADevice const &dataA, cms::alpakatest::AlpakaESTestDataB< Device > const &dataB)
 

Typedef Documentation

◆ AlpakaESTestDataADevice

Definition at line 13 of file AlpakaESTestData.h.

◆ AlpakaESTestDataAHost

Definition at line 12 of file AlpakaESTestData.h.

◆ AlpakaESTestDataCDevice

Definition at line 16 of file AlpakaESTestData.h.

◆ AlpakaESTestDataCHost

Definition at line 15 of file AlpakaESTestData.h.

◆ AlpakaESTestDataDDevice

Definition at line 19 of file AlpakaESTestData.h.

◆ AlpakaESTestDataDHost

Definition at line 18 of file AlpakaESTestData.h.

◆ PortableCollection

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

Definition at line 28 of file PortableCollection.h.

Function Documentation

◆ testESAlgoAsync()

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

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

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

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

6  {
7  auto const size = std::min(dataA->metadata().size(), static_cast<int>(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,
22  AlpakaESTestDataADevice::ConstView a,
23  int const* b,
25  int size) {
26  const int32_t thread = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0u];
27  const int32_t stride = alpaka::getWorkDiv<alpaka::Grid, alpaka::Threads>(acc)[0u];
28  for (auto i = thread; i < size; i += stride) {
29  c[i] = a.z()[i] + b[i];
30  }
31  },
32  dataA.view(),
33  dataB.data(),
34  ret.view(),
35  size);
36 
37  return ret;
38  }
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:120
double a
Definition: hdecay.h:121