alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::test Namespace Reference

The test specifics. More...

Namespaces

 cpu
 
 detail
 The detail namespace is used to separate implementation details from user accessible code.
 
 integ
 
 trait
 
 uniform_cuda_hip
 

Classes

struct  Array
 
class  EventHostManualTriggerCpu
 Event that can be enqueued into a queue and can be triggered by the Host. More...
 
class  EventHostManualTriggerCuda
 
class  KernelExecutionFixture
 The fixture for executing a kernel on a given accelerator. More...
 
struct  QueueTestFixture
 
struct  VerifyBytesSetKernel
 Compares element-wise that all bytes are set to the same value. More...
 
struct  VerifyViewsEqualKernel
 Compares iterators element-wise. More...
 

Typedefs

template<typename TDev >
using DefaultQueue = typename trait::DefaultQueueType< TDev >::type
 The queue type that should be used for the given device. More...
 
template<typename TDim , typename TIdx >
using EnabledAccs = typename meta::Filter< detail::EnabledAccsElseInt< TDim, TIdx >, std::is_class >
 A vector containing all available accelerators. More...
 
template<typename TDev >
using EventHostManualTrigger = typename trait::EventHostManualTriggerType< TDev >::type
 The event host manual trigger type trait alias template to remove the ::type. More...
 
template<typename TQueue >
using IsBlockingQueue = trait::IsBlockingQueue< TQueue >
 The queue type that should be used for the given accelerator. More...
 
template<typename TView >
using Iterator = trait::IteratorView< TView >
 
using NonZeroTestDims = meta::Filter< TestDims, meta::NonZero >
 A std::tuple holding non-zero dimensions. More...
 
using TestAccs = meta::Apply< detail::InstantiatedEnabledAccs, meta::Concatenate >
 A std::tuple containing fully instantiated accelerators. More...
 
using TestDims = std::tuple< DimInt< 0u >, DimInt< 1u >, DimInt< 2u >, DimInt< 3u > >
 A std::tuple holding dimensions. More...
 
using TestIdxs = std::tuple< std::int64_t, std::uint64_t, std::int32_t, std::uint32_t >
 A std::tuple holding idx types. More...
 
using TestQueues = std::tuple< std::tuple< DevCpu, QueueCpuBlocking >, std::tuple< DevCpu, QueueCpuNonBlocking >, std::tuple< DevCudaRt, QueueCudaRtBlocking >, std::tuple< DevCudaRt, QueueCudaRtNonBlocking > >
 A std::tuple holding tuples of devices and corresponding queue types. More...
 

Functions

template<typename TView >
ALPAKA_FN_HOST auto begin (TView &view) -> Iterator< TView >
 
template<typename TView >
ALPAKA_FN_HOST auto end (TView &view) -> Iterator< TView >
 
template<typename TView , typename TQueue >
ALPAKA_FN_HOST auto iotaFillView (TQueue &queue, TView &view) -> void
 Fills the given view with increasing values starting at 0. More...
 
template<typename TDev >
ALPAKA_FN_HOST auto isEventHostManualTriggerSupported (TDev const &dev) -> bool
 
template<typename TElem , typename TDim , typename TIdx , typename TDev , typename TView >
ALPAKA_FN_HOST auto testViewImmutable (TView const &view, TDev const &dev, Vec< TDim, TIdx > const &extent, Vec< TDim, TIdx > const &offset) -> void
 
template<typename TAcc , typename TView , typename TQueue >
ALPAKA_FN_HOST auto testViewMutable (TQueue &queue, TView &view) -> void
 
template<typename TAcc , typename TView >
ALPAKA_FN_HOST auto verifyBytesSet (TView const &view, std::uint8_t const &byte) -> void
 
template<typename TAcc , typename TViewB , typename TViewA >
ALPAKA_FN_HOST auto verifyViewsEqual (TViewA const &viewA, TViewB const &viewB) -> void
 
template<typename TDim , typename TIdx >
ALPAKA_FN_HOST auto writeEnabledAccs (std::ostream &os) -> void
 Writes the enabled accelerators to the given stream. More...
 

Variables

template<typename TDim , typename TVal >
constexpr auto extentBuf
 
template<typename TDim , typename TVal >
constexpr auto extentSubView
 
template<typename TDim , typename TVal >
constexpr auto offset
 

Detailed Description

The test specifics.

Typedef Documentation

◆ DefaultQueue

template<typename TDev >
using alpaka::test::DefaultQueue = typedef typename trait::DefaultQueueType<TDev>::type

The queue type that should be used for the given device.

Definition at line 45 of file Queue.hpp.

◆ EnabledAccs

template<typename TDim , typename TIdx >
using alpaka::test::EnabledAccs = typedef typename meta::Filter<detail::EnabledAccsElseInt<TDim, TIdx>, std::is_class>

A vector containing all available accelerators.

Definition at line 119 of file TestAccs.hpp.

◆ EventHostManualTrigger

template<typename TDev >
using alpaka::test::EventHostManualTrigger = typedef typename trait::EventHostManualTriggerType<TDev>::type

The event host manual trigger type trait alias template to remove the ::type.

Definition at line 27 of file EventHostManualTrigger.hpp.

◆ IsBlockingQueue

template<typename TQueue >
using alpaka::test::IsBlockingQueue = typedef trait::IsBlockingQueue<TQueue>

The queue type that should be used for the given accelerator.

Definition at line 162 of file Queue.hpp.

◆ Iterator

template<typename TView >
using alpaka::test::Iterator = typedef trait::IteratorView<TView>

Definition at line 130 of file Iterator.hpp.

◆ NonZeroTestDims

A std::tuple holding non-zero dimensions.

NonZeroTestDims = std::tuple<Dim1, Dim2, ... DimN>

Definition at line 32 of file TestDims.hpp.

◆ TestAccs

A std::tuple containing fully instantiated accelerators.

TestAccs = tuple< Acc1<Dim1,Idx1>, ..., AccN<Dim1,Idx1>, Acc1<Dim2,Idx1>, ..., AccN<Dim2,Idx1>, ..., Acc1<DimN,IdxN>, ..., AccN<DimN,IdxN>>

Definition at line 181 of file TestAccs.hpp.

◆ TestDims

using alpaka::test::TestDims = typedef std::tuple< DimInt<0u>, DimInt<1u>, DimInt<2u>, DimInt<3u> >

A std::tuple holding dimensions.

Definition at line 17 of file TestDims.hpp.

◆ TestIdxs

using alpaka::test::TestIdxs = typedef std::tuple< std::int64_t, std::uint64_t, std::int32_t , std::uint32_t >

A std::tuple holding idx types.

Definition at line 13 of file TestIdxs.hpp.

◆ TestQueues

using alpaka::test::TestQueues = typedef std::tuple< std::tuple<DevCpu, QueueCpuBlocking>, std::tuple<DevCpu, QueueCpuNonBlocking> , std::tuple<DevCudaRt, QueueCudaRtBlocking>, std::tuple<DevCudaRt, QueueCudaRtNonBlocking> >

A std::tuple holding tuples of devices and corresponding queue types.

Definition at line 165 of file Queue.hpp.

Function Documentation

◆ begin()

template<typename TView >
ALPAKA_FN_HOST auto alpaka::test::begin ( TView &  view) -> Iterator<TView>

Definition at line 133 of file Iterator.hpp.

◆ end()

template<typename TView >
ALPAKA_FN_HOST auto alpaka::test::end ( TView &  view) -> Iterator<TView>

Definition at line 139 of file Iterator.hpp.

◆ iotaFillView()

template<typename TView , typename TQueue >
ALPAKA_FN_HOST auto alpaka::test::iotaFillView ( TQueue &  queue,
TView &  view 
) -> void

Fills the given view with increasing values starting at 0.

Definition at line 197 of file ViewTest.hpp.

◆ isEventHostManualTriggerSupported()

template<typename TDev >
ALPAKA_FN_HOST auto alpaka::test::isEventHostManualTriggerSupported ( TDev const &  dev) -> bool

Definition at line 30 of file EventHostManualTrigger.hpp.

◆ testViewImmutable()

template<typename TElem , typename TDim , typename TIdx , typename TDev , typename TView >
ALPAKA_FN_HOST auto alpaka::test::testViewImmutable ( TView const &  view,
TDev const &  dev,
Vec< TDim, TIdx > const &  extent,
Vec< TDim, TIdx > const &  offset 
) -> void

Definition at line 20 of file ViewTest.hpp.

◆ testViewMutable()

template<typename TAcc , typename TView , typename TQueue >
ALPAKA_FN_HOST auto alpaka::test::testViewMutable ( TQueue &  queue,
TView &  view 
) -> void

Definition at line 218 of file ViewTest.hpp.

◆ verifyBytesSet()

template<typename TAcc , typename TView >
ALPAKA_FN_HOST auto alpaka::test::verifyBytesSet ( TView const &  view,
std::uint8_t const &  byte 
) -> void

Definition at line 133 of file ViewTest.hpp.

◆ verifyViewsEqual()

template<typename TAcc , typename TViewB , typename TViewA >
ALPAKA_FN_HOST auto alpaka::test::verifyViewsEqual ( TViewA const &  viewA,
TViewB const &  viewB 
) -> void

Definition at line 179 of file ViewTest.hpp.

◆ writeEnabledAccs()

template<typename TDim , typename TIdx >
ALPAKA_FN_HOST auto alpaka::test::writeEnabledAccs ( std::ostream &  os) -> void

Writes the enabled accelerators to the given stream.

Definition at line 137 of file TestAccs.hpp.

Variable Documentation

◆ extentBuf

template<typename TDim , typename TVal >
constexpr auto alpaka::test::extentBuf
inlineconstexpr
Initial value:
= []
{
Vec<TDim, TVal> v;
if constexpr(TDim::value > 0)
for(TVal i = 0; i < TVal{TDim::value}; i++)
v[i] = 11 - i;
return v;
}()

Definition at line 14 of file Extent.hpp.

◆ extentSubView

template<typename TDim , typename TVal >
constexpr auto alpaka::test::extentSubView
inlineconstexpr
Initial value:
= []
{
Vec<TDim, TVal> v;
if constexpr(TDim::value > 0)
for(TVal i = 0; i < TVal{TDim::value}; i++)
v[i] = 8 - i * 2;
return v;
}()

Definition at line 24 of file Extent.hpp.

◆ offset

template<typename TDim , typename TVal >
constexpr auto alpaka::test::offset
inlineconstexpr
Initial value:
= []
{
Vec<TDim, TVal> v;
if constexpr(TDim::value > 0)
for(TVal i = 0; i < TVal{TDim::value}; i++)
v[i] = 2 + i;
return v;
}()

Definition at line 34 of file Extent.hpp.