Skip to content

Class muda::BufferViewT

template <bool IsConst, typename T>

ClassList > muda > BufferViewT

Inherits the following classes: muda::ViewBase

Public Types

Type Name
typedef CDense1D< T > CViewer
typedef BufferViewT< true, T > ConstView
typedef BufferViewT< IsConst, T > ThisView
typedef std::conditional_t< IsConst, CViewer, Viewer > ThisViewer
typedef Dense1D< T > Viewer
typedef typename Base::template auto_const_t< U > auto_const_t
typedef size_t difference_type
typedef std::random_access_iterator_tag iterator_category
typedef T * pointer
typedef T & reference
typedef T value_type

Public Types inherited from muda::ViewBase

See muda::ViewBase

Type Name
typedef std::conditional_t< IsConst, const T, T > auto_const_t
typedef std::enable_if_t< IsNonConst, T > non_const_enable_t

Public Static Attributes inherited from muda::ViewBase

See muda::ViewBase

Type Name
constexpr bool IsConst = = IsConst_
constexpr bool IsNonConst = = !IsConst_

Public Functions

Type Name
MUDA_GENERIC BufferViewT ()
MUDA_GENERIC BufferViewT (const BufferViewT & other)
MUDA_GENERIC BufferViewT (auto_const_t< T > * data, size_t offset, size_t size)
MUDA_GENERIC BufferViewT (auto_const_t< T > * data, size_t size)
MUDA_GENERIC BufferViewT (const BufferViewT< OtherIsConst, T > & other)
MUDA_GENERIC ConstView as_const () const
MUDA_HOST void copy_from (const BufferViewT< true, T > & other) const
MUDA_HOST void copy_from (const T * host) const
MUDA_HOST void copy_to (T * host) const
MUDA_GENERIC CViewer cviewer () const
MUDA_GENERIC auto_const_t< T > * data () const
MUDA_GENERIC auto_const_t< T > * data (size_t i) const
MUDA_HOST void fill (const T & value) const
MUDA_GENERIC size_t offset () const
MUDA_GENERIC reference operator* () const
MUDA_GENERIC ThisView operator+ (int i) const
MUDA_GENERIC auto_const_t< T > & operator[] (size_t i) const
MUDA_GENERIC auto_const_t< T > & operator[] (int i) const
MUDA_GENERIC auto_const_t< T > * origin_data () const
MUDA_GENERIC size_t size () const
MUDA_GENERIC ThisView subview (size_t offset, size_t size=~0) const
MUDA_GENERIC ThisViewer viewer () const

Protected Attributes

Type Name
auto_const_t< T > * m_data = = nullptr
size_t m_offset = = ~0
size_t m_size = = ~0

Public Types Documentation

typedef CViewer

using muda::BufferViewT< IsConst, T >::CViewer =  CDense1D<T>;

typedef ConstView

using muda::BufferViewT< IsConst, T >::ConstView =  BufferViewT<true, T>;

typedef ThisView

using muda::BufferViewT< IsConst, T >::ThisView =  BufferViewT<IsConst, T>;

typedef ThisViewer

using muda::BufferViewT< IsConst, T >::ThisViewer =  std::conditional_t<IsConst, CViewer, Viewer>;

typedef Viewer

using muda::BufferViewT< IsConst, T >::Viewer =  Dense1D<T>;

typedef auto_const_t

using muda::BufferViewT< IsConst, T >::auto_const_t =  typename Base::template auto_const_t<U>;

typedef difference_type

using muda::BufferViewT< IsConst, T >::difference_type =  size_t;

typedef iterator_category

using muda::BufferViewT< IsConst, T >::iterator_category =  std::random_access_iterator_tag;

typedef pointer

using muda::BufferViewT< IsConst, T >::pointer =  T*;

typedef reference

using muda::BufferViewT< IsConst, T >::reference =  T&;

typedef value_type

using muda::BufferViewT< IsConst, T >::value_type =  T;

Public Functions Documentation

function BufferViewT [2/6]

MUDA_GENERIC muda::BufferViewT::BufferViewT () 

function BufferViewT [3/6]

MUDA_GENERIC muda::BufferViewT::BufferViewT (
    const BufferViewT & other
) 

function BufferViewT [4/6]

MUDA_GENERIC muda::BufferViewT::BufferViewT (
    auto_const_t< T > * data,
    size_t offset,
    size_t size
) 

function BufferViewT [5/6]

MUDA_GENERIC muda::BufferViewT::BufferViewT (
    auto_const_t< T > * data,
    size_t size
) 

function BufferViewT [6/6]

template<bool OtherIsConst>
MUDA_GENERIC muda::BufferViewT::BufferViewT (
    const BufferViewT < OtherIsConst, T > & other
) 

function as_const

MUDA_GENERIC ConstView muda::BufferViewT::as_const () const

function copy_from [1/2]

MUDA_HOST void muda::BufferViewT::copy_from (
    const BufferViewT < true, T > & other
) const

function copy_from [2/2]

MUDA_HOST void muda::BufferViewT::copy_from (
    const T * host
) const

function copy_to

MUDA_HOST void muda::BufferViewT::copy_to (
    T * host
) const

function cviewer

MUDA_GENERIC CViewer muda::BufferViewT::cviewer () const

function data [1/2]

MUDA_GENERIC auto_const_t< T > * muda::BufferViewT::data () const

function data [2/2]

MUDA_GENERIC auto_const_t< T > * muda::BufferViewT::data (
    size_t i
) const

function fill

MUDA_HOST void muda::BufferViewT::fill (
    const T & value
) const

function offset

inline MUDA_GENERIC size_t muda::BufferViewT::offset () const

function operator*

MUDA_GENERIC reference muda::BufferViewT::operator* () const

function operator+

MUDA_GENERIC ThisView muda::BufferViewT::operator+ (
    int i
) const

function operator[]

MUDA_GENERIC auto_const_t< T > & muda::BufferViewT::operator[] (
    size_t i
) const

function operator[]

MUDA_GENERIC auto_const_t< T > & muda::BufferViewT::operator[] (
    int i
) const

function origin_data

MUDA_GENERIC auto_const_t< T > * muda::BufferViewT::origin_data () const

function size

inline MUDA_GENERIC size_t muda::BufferViewT::size () const

function subview

MUDA_GENERIC ThisView muda::BufferViewT::subview (
    size_t offset,
    size_t size=~0
) const

function viewer

MUDA_GENERIC ThisViewer muda::BufferViewT::viewer () const

Protected Attributes Documentation

variable m_data

auto_const_t<T>* muda::BufferViewT< IsConst, T >::m_data;

variable m_offset

size_t muda::BufferViewT< IsConst, T >::m_offset;

variable m_size

size_t muda::BufferViewT< IsConst, T >::m_size;


The documentation for this class was generated from the following file src/muda/buffer/buffer_view.h