alpaka
Abstraction Library for Parallel Kernel Acceleration
Traits.hpp File Reference
#include "alpaka/core/Common.hpp"
#include "alpaka/core/Unreachable.hpp"
#include "alpaka/dev/Traits.hpp"
#include "alpaka/dim/Traits.hpp"
#include "alpaka/elem/Traits.hpp"
#include "alpaka/extent/Traits.hpp"
#include "alpaka/meta/Fold.hpp"
#include "alpaka/meta/Integral.hpp"
#include "alpaka/offset/Traits.hpp"
#include "alpaka/queue/Traits.hpp"
#include "alpaka/vec/Traits.hpp"
#include "alpaka/vec/Vec.hpp"
#include <array>
#include <cstddef>
#include <iosfwd>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Classes

struct  alpaka::detail::Print< TDim, TView >
 
struct  alpaka::detail::Print< DimInt< Dim< TView >::value - 1u >, TView >
 
struct  alpaka::trait::GetPitchBytes< TIdx, TView, TSfinae >
 The pitch in bytes. This is the distance in bytes in the linear memory between two consecutive elements in the next higher dimension (TIdx-1). More...
 
struct  alpaka::trait::GetPitchesInBytes< TView, TSfinae >
 Customization point for getPitchesInBytes. The default implementation uses the extent to calculate the pitches. More...
 

Namespaces

 alpaka
 The alpaka accelerator library.
 
 alpaka::detail
 
 alpaka::trait
 The accelerator traits.
 

Functions

template<typename TElem , typename TDim , typename TIdx >
constexpr ALPAKA_FN_HOST_ACC auto alpaka::detail::calculatePitchesFromExtents (Vec< TDim, TIdx > const &extent)
 Calculate the pitches purely from the extents. More...
 
template<typename TView , typename TExtent , typename TOffsets >
auto alpaka::createSubView (TView &view, TExtent const &extent, TOffsets const &offset=TExtent())
 Creates a sub view to an existing view. More...
 
template<typename TExtent , typename TViewSrc , typename TViewDstFwd >
ALPAKA_FN_HOST auto alpaka::createTaskMemcpy (TViewDstFwd &&viewDst, TViewSrc const &viewSrc, TExtent const &extent)
 Creates a memory copy task. More...
 
template<typename TExtent , typename TViewFwd >
ALPAKA_FN_HOST auto alpaka::createTaskMemset (TViewFwd &&view, std::uint8_t const &byte, TExtent const &extent)
 Create a memory set task. More...
 
template<typename TDev , typename TContainer >
auto alpaka::createView (TDev const &dev, TContainer &con)
 Creates a view to a contiguous container of device-accessible memory. More...
 
template<typename TDev , typename TContainer , typename TExtent >
auto alpaka::createView (TDev const &dev, TContainer &con, TExtent const &extent)
 Creates a view to a contiguous container of device-accessible memory. More...
 
template<typename TDev , typename TElem , typename TExtent >
auto alpaka::createView (TDev const &dev, TElem *pMem, TExtent const &extent)
 Creates a view to a device pointer. More...
 
template<typename TDev , typename TElem , typename TExtent , typename TPitch >
auto alpaka::createView (TDev const &dev, TElem *pMem, TExtent const &extent, TPitch pitch)
 Creates a view to a device pointer. More...
 
template<std::size_t Tidx, typename TView >
ALPAKA_FN_HOST auto alpaka::getPitchBytes (TView const &view) -> Idx< TView >
 
template<typename TView >
auto alpaka::getPitchBytesVec (TView const &view) -> Vec< Dim< TView >, Idx< TView >>
 
template<typename TDim , typename TView >
ALPAKA_FN_HOST auto alpaka::getPitchBytesVecEnd (TView const &view=TView()) -> Vec< TDim, Idx< TView >>
 
template<typename TView >
ALPAKA_FN_HOST auto alpaka::getPitchesInBytes (TView const &view) -> Vec< Dim< TView >, Idx< TView >>
 
template<typename TView , typename TDev >
ALPAKA_FN_HOST auto alpaka::getPtrDev (TView &view, TDev const &dev) -> Elem< TView > *
 Gets the pointer to the view on the given device. More...
 
template<typename TView , typename TDev >
ALPAKA_FN_HOST auto alpaka::getPtrDev (TView const &view, TDev const &dev) -> Elem< TView > const *
 Gets the pointer to the view on the given device. More...
 
template<typename TView >
ALPAKA_FN_HOST auto alpaka::getPtrNative (TView &view) -> Elem< TView > *
 Gets the native pointer of the memory view. More...
 
template<typename TView >
ALPAKA_FN_HOST auto alpaka::getPtrNative (TView const &view) -> Elem< TView > const *
 Gets the native pointer of the memory view. More...
 
template<typename TViewSrc , typename TViewDstFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memcpy (TQueue &queue, TViewDstFwd &&viewDst, TViewSrc const &viewSrc) -> void
 Copies the entire memory of viewSrc to viewDst. Possibly copies between different memory spaces. More...
 
template<typename TExtent , typename TViewSrc , typename TViewDstFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memcpy (TQueue &queue, TViewDstFwd &&viewDst, TViewSrc const &viewSrc, TExtent const &extent) -> void
 Copies memory from a part of viewSrc to viewDst, described by extent. Possibly copies between different memory spaces. More...
 
template<typename TViewFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memset (TQueue &queue, TViewFwd &&view, std::uint8_t const &byte) -> void
 Sets each byte of the memory of the entire view to the given value. More...
 
template<typename TExtent , typename TViewFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::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. More...
 
template<typename TView >
ALPAKA_FN_HOST auto alpaka::print (TView const &view, std::ostream &os, std::string const &elementSeparator=", ", std::string const &rowSeparator="\n", std::string const &rowPrefix="[", std::string const &rowSuffix="]") -> void
 Prints the content of the view to the given queue. More...