23 template<
typename TDim,
typename TView,
typename TExtent>
26 static_assert(TDim::value > 0);
32 template<
typename TViewFwd>
33 TaskSetCpuBase(TViewFwd&& view, std::uint8_t
const&
byte, TExtent
const& extent)
44 if constexpr(TDim::value > 1)
48 #if ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL
60 #if(!defined(NDEBUG)) || (ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL)
68 template<
typename TDim,
typename TView,
typename TExtent>
81 #if ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL
89 if(
static_cast<std::size_t
>(this->
m_extent.prod()) != 0u)
92 extentWithoutInnermost,
96 this->
m_dstMemNative + (castVec<DstSize>(idx) * dstPitchBytesWithoutOutmost).sum(),
105 template<
typename TView,
typename TExtent>
114 #if ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL
117 if(
static_cast<std::size_t
>(this->
m_extent.prod()) != 0u)
128 template<
typename TView,
typename TExtent>
136 template<
typename TViewFwd>
137 TaskSetCpu(TViewFwd&& view, std::uint8_t
const&
byte, [[maybe_unused]] TExtent
const& extent)
146 #if ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL
149 std::cout << __func__ <<
" e: " <<
Scalar() <<
" ewb: " <<
sizeof(
Elem) <<
" de: " <<
Scalar()
159 #if ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL
173 template<
typename TDim>
176 template<
typename TExtent,
typename TViewFwd>
179 std::uint8_t
const&
byte,
182 return {std::forward<TViewFwd>(view), byte, extent};
#define ALPAKA_ASSERT(...)
The assert can be explicit disabled by defining NDEBUG.
#define ALPAKA_DEBUG
Set the minimum log level if it is not defined.
#define ALPAKA_DEBUG_MINIMAL_LOG_SCOPE
#define ALPAKA_DEBUG_FULL
The full debug level.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto all(TWarp const &warp, std::int32_t predicate) -> std::int32_t
Evaluates predicate for all active threads of the warp and returns non-zero if and only if predicate ...
The alpaka accelerator library.
typename trait::IdxType< T >::type Idx
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getExtents(T const &object) -> Vec< Dim< T >, Idx< T >>
ALPAKA_FN_HOST auto getPitchesInBytes(TView const &view) -> Vec< Dim< TView >, Idx< TView >>
ALPAKA_FN_HOST auto getPtrNative(TView const &view) -> Elem< TView > const *
Gets the native pointer of the memory view.
std::remove_volatile_t< typename trait::ElemType< TView >::type > Elem
The element type trait alias template to remove the ::type.
ALPAKA_FN_HOST auto memset(TQueue &queue, TViewFwd &&view, std::uint8_t const &byte, TExtent const &extent) -> void
Sets the bytes of the memory of view, described by extent, to the given value.
std::integral_constant< std::size_t, N > DimInt
The CPU device ND memory set task base.
ExtentSize const m_extentWidthBytes
ALPAKA_FN_HOST auto printDebug() const -> void
std::uint8_t const m_byte
Vec< TDim, DstSize > const m_dstExtent
Idx< TExtent > ExtentSize
std::uint8_t *const m_dstMemNative
Vec< TDim, ExtentSize > const m_extent
TaskSetCpuBase(TViewFwd &&view, std::uint8_t const &byte, TExtent const &extent)
alpaka::Elem< TView > Elem
Vec< TDim, DstSize > const m_dstPitchBytes
ALPAKA_FN_HOST auto printDebug() const -> void
std::uint8_t const m_byte
Idx< TExtent > ExtentSize
TaskSetCpu(TViewFwd &&view, std::uint8_t const &byte, [[maybe_unused]] TExtent const &extent)
ALPAKA_FN_HOST auto operator()() const noexcept(ALPAKA_DEBUG< ALPAKA_DEBUG_FULL) -> void
alpaka::Elem< TView > Elem
std::uint8_t *const m_dstMemNative
ALPAKA_FN_HOST auto operator()() const -> void
The CPU device ND memory set task.
ALPAKA_FN_HOST auto operator()() const -> void
DimInt< TDim::value - 1u > DimMin1
static ALPAKA_FN_HOST auto createTaskMemset(TViewFwd &&view, std::uint8_t const &byte, TExtent const &extent) -> alpaka::detail::TaskSetCpu< TDim, std::remove_reference_t< TViewFwd >, TExtent >
The memory set task trait.