![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Non owning view to data. More...
#include <View.hpp>
Public Member Functions | |
| template<alpaka::concepts::HasApi T_Any, alpaka::concepts::Vector T_UserExtents, alpaka::concepts::Vector T_UserPitches> | |
| constexpr | View (T_Any const &any, T_Type *data, T_UserExtents const &extents, T_UserPitches const &pitches, T_MemAlignment const memAlignment=T_MemAlignment{}) |
| Creates a view. | |
| constexpr | View (View &&)=default |
| constexpr | View (View const &)=default |
| template<typename T_Type_Other> | |
| constexpr | View (View< T_Api, T_Type_Other, T_Extents, T_MemAlignment > &&other) |
| template<typename T_Type_Other> | |
| constexpr | View (View< T_Api, T_Type_Other, T_Extents, T_MemAlignment > const &other) |
| constexpr auto | getConstView () const |
| create a read only view | |
| constexpr alpaka::concepts::IMdSpan auto | getMdSpan () |
| constexpr alpaka::concepts::IMdSpan auto | getMdSpan () const |
| template<alpaka::concepts::Vector LowHaloVecType, alpaka::concepts::Vector UpHaloVecType> | |
| constexpr auto | getSubView (alpaka::BoundaryDirection< View::dim(), LowHaloVecType, UpHaloVecType > boundaryDir) const |
| constexpr View & | operator= (View &&)=default |
| constexpr View & | operator= (View const &)=default |
| Assignment operator keeping const-ness. | |
| constexpr auto | getSubView (alpaka::concepts::VectorOrScalar auto const &extents) const |
| Creates a sub view to a part of the memory. | |
| constexpr auto | getSubView (alpaka::concepts::VectorOrScalar auto const &extents) |
| Creates a sub view to a part of the memory. | |
| constexpr auto | getSubView (alpaka::concepts::VectorOrScalar auto const &offset, alpaka::concepts::VectorOrScalar auto const &extents) const |
| Creates a sub view to a part of the memory. | |
| constexpr auto | getSubView (alpaka::concepts::VectorOrScalar auto const &offset, alpaka::concepts::VectorOrScalar auto const &extents) |
| Creates a sub view to a part of the memory. | |
| Public Member Functions inherited from alpaka::MdSpan< T_Type, T_Extents::UniVec, T_Extents::UniVec, T_MemAlignment > | |
| constexpr | MdSpan ()=default |
| constexpr auto | begin () const |
| constexpr auto | cbegin () const |
| constexpr auto | cend () const |
| constexpr const_pointer | data () const |
| get origin pointer | |
| constexpr auto | end () const |
| constexpr auto | getConstMdSpan () const |
| constexpr auto | getExtents () const |
| constexpr T_Pitches | getPitches () const |
| constexpr | operator bool () const noexcept |
| True if MdSpan is pointing to valid memory. | |
| constexpr const_reference | operator* () const |
| return value the origin pointer is pointing to | |
| constexpr MdSpan & | operator= (MdSpan const &)=default |
| Assignment operator keeping const-ness. | |
| constexpr const_reference | operator[] (concepts::IndexVec< index_type, alpaka::trait::GetDim< T_Extents >::value > auto const &idx) const |
| get value at the given index | |
Static Public Member Functions | |
| static consteval T_Api | getApi () |
| Static Public Member Functions inherited from alpaka::MdSpan< T_Type, T_Extents::UniVec, T_Extents::UniVec, T_MemAlignment > | |
| static consteval uint32_t | dim () |
| static constexpr auto | getAlignment () |
Private Types | |
| using | BaseMdSpan = MdSpan<T_Type, typename T_Extents::UniVec, typename T_Extents::UniVec, T_MemAlignment> |
Additional Inherited Members | |
| Public Types inherited from alpaka::MdSpan< T_Type, T_Extents::UniVec, T_Extents::UniVec, T_MemAlignment > | |
| using | const_pointer |
| using | const_reference |
| using | ConstThis |
| using | index_type |
| using | pointer |
| using | reference |
| using | value_type |
| Protected Member Functions inherited from alpaka::MdSpan< T_Type, T_Extents::UniVec, T_Extents::UniVec, T_MemAlignment > | |
| constexpr auto | ptr (concepts::Vector auto const &idx) const |
| get the pointer of the value relative to the origin pointer m_ptr | |
Non owning view to data.
This view is only holding a pointer to real data, copying the view is cheap. Const-ness of the view instance is propagated to the data region.
This satisfies the alpaka::concepts::IView concept and, therefore, also the alpaka::concepts::IMdSpan concept.
|
private |
|
inlineconstexpr |
|
inlineconstexpr |
|
constexprdefault |
|
inlineconstexpr |
|
constexprdefault |
|
inlinestaticconsteval |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Creates a sub view to a part of the memory.
The sub view has the same dimension as the original.
| extents | Number of elements for each dimension. Each number must be less than or equal to the number of elements in the original dimension. |
|
inlineconstexpr |
Creates a sub view to a part of the memory.
The sub view has the same dimension as the original.
| extents | Number of elements for each dimension. Each number must be less than or equal to the number of elements in the original dimension. |
|
inlineconstexpr |
Creates a sub view to a part of the memory.
The sub view has the same dimension as the original. The offset defines the first coordinate of each dimension. The offset + extents - 1 defines the last element for each dimension in the original view. Offset plus extents should not exceed the extents of the original view.
| offset | offset in elements to the original view |
| extents | number of elements for each dimension |
|
inlineconstexpr |
Creates a sub view to a part of the memory.
The sub view has the same dimension as the original. The offset defines the first coordinate of each dimension. The offset + extents - 1 defines the last element for each dimension in the original view. Offset plus extents should not exceed the extents of the original view.
| offset | offset in elements to the original view |
| extents | number of elements for each dimension |
|
constexprdefault |
|
constexprdefault |
Assignment operator keeping const-ness.