Skip to content

Class muda::Buffer2DViewT

template <bool IsConst, typename T>

ClassList > muda > Buffer2DViewT

Inherits the following classes: muda::ViewBase

Public Types

Type Name
typedef CDense2D< T > CViewer
typedef Buffer2DViewT< true, T > ConstView
typedef Buffer2DViewT< IsConst, T > ThisView
typedef std::conditional_t< IsConst, CViewer, Viewer > ThisViewer
typedef Dense2D< T > Viewer

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 Buffer2DViewT ()
MUDA_GENERIC Buffer2DViewT (const Buffer2DViewT &)
MUDA_GENERIC Buffer2DViewT (const Buffer2DViewT< OtherIsConst, T > & other)
MUDA_GENERIC Buffer2DViewT (auto_const_t< T > * data, size_t pitch_bytes, size_t origin_width, size_t origin_height, const Offset2D & offset, const Extent2D & extent)
MUDA_GENERIC Buffer2DViewT (auto_const_t< T > * data, size_t pitch_bytes, const Offset2D & offset, const Extent2D & extent)
ConstView as_const () const
MUDA_HOST void copy_from (const Buffer2DViewT< true, T > & other)
MUDA_HOST void copy_from (const T * host)
MUDA_HOST void copy_to (T * host) const
MUDA_GENERIC CViewer cviewer () const
MUDA_GENERIC auto_const_t< T > * data (size_t x, size_t y) const
MUDA_GENERIC auto_const_t< T > * data (size_t flatten_i) const
MUDA_GENERIC Extent2D extent () const
MUDA_HOST void fill (const T & v)
MUDA_GENERIC Offset2D offset () const
MUDA_GENERIC auto_const_t< T > * origin_data () const
MUDA_GENERIC size_t pitch_bytes () const
MUDA_GENERIC ThisView subview (Offset2D offset, Extent2D extent={}) const
MUDA_GENERIC size_t total_size () const
MUDA_GENERIC ThisViewer viewer () const

Protected Attributes

Type Name
auto_const_t< T > * m_data = = nullptr
Extent2D m_extent
Offset2D m_offset
size_t m_origin_height = = 0
size_t m_origin_width = = 0
size_t m_pitch_bytes = = ~0

Public Types Documentation

typedef CViewer

using muda::Buffer2DViewT< IsConst, T >::CViewer =  CDense2D<T>;

typedef ConstView

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

typedef ThisView

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

typedef ThisViewer

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

typedef Viewer

using muda::Buffer2DViewT< IsConst, T >::Viewer =  Dense2D<T>;

Public Functions Documentation

function Buffer2DViewT [2/6]

MUDA_GENERIC muda::Buffer2DViewT::Buffer2DViewT () 

function Buffer2DViewT [3/6]

MUDA_GENERIC muda::Buffer2DViewT::Buffer2DViewT (
    const Buffer2DViewT &
) 

function Buffer2DViewT [4/6]

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

function Buffer2DViewT [5/6]

MUDA_GENERIC muda::Buffer2DViewT::Buffer2DViewT (
    auto_const_t< T > * data,
    size_t pitch_bytes,
    size_t origin_width,
    size_t origin_height,
    const Offset2D & offset,
    const Extent2D & extent
) 

function Buffer2DViewT [6/6]

MUDA_GENERIC muda::Buffer2DViewT::Buffer2DViewT (
    auto_const_t< T > * data,
    size_t pitch_bytes,
    const Offset2D & offset,
    const Extent2D & extent
) 

function as_const

ConstView muda::Buffer2DViewT::as_const () const

function copy_from [1/2]

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

function copy_from [2/2]

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

function copy_to

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

function cviewer

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

function data [1/2]

MUDA_GENERIC auto_const_t< T > * muda::Buffer2DViewT::data (
    size_t x,
    size_t y
) const

function data [2/2]

MUDA_GENERIC auto_const_t< T > * muda::Buffer2DViewT::data (
    size_t flatten_i
) const

function extent

MUDA_GENERIC Extent2D muda::Buffer2DViewT::extent () const

function fill

MUDA_HOST void muda::Buffer2DViewT::fill (
    const T & v
) 

function offset

MUDA_GENERIC Offset2D muda::Buffer2DViewT::offset () const

function origin_data

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

function pitch_bytes

MUDA_GENERIC size_t muda::Buffer2DViewT::pitch_bytes () const

function subview

MUDA_GENERIC ThisView muda::Buffer2DViewT::subview (
    Offset2D offset,
    Extent2D extent={}
) const

function total_size

MUDA_GENERIC size_t muda::Buffer2DViewT::total_size () const

function viewer

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

Protected Attributes Documentation

variable m_data

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

variable m_extent

Extent2D muda::Buffer2DViewT< IsConst, T >::m_extent;

variable m_offset

Offset2D muda::Buffer2DViewT< IsConst, T >::m_offset;

variable m_origin_height

size_t muda::Buffer2DViewT< IsConst, T >::m_origin_height;

variable m_origin_width

size_t muda::Buffer2DViewT< IsConst, T >::m_origin_width;

variable m_pitch_bytes

size_t muda::Buffer2DViewT< IsConst, T >::m_pitch_bytes;

Friends Documentation

friend BufferInfoAccessor

class muda::Buffer2DViewT::BufferInfoAccessor (
    details::buffer::BufferInfoAccessor
) 


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