atlas
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
atlas::array::TableView< ReadOnly > Class Template Reference
Inheritance diagram for atlas::array::TableView< ReadOnly >:
Inheritance graph
[legend]
Collaboration diagram for atlas::array::TableView< ReadOnly >:
Collaboration graph
[legend]

Classes

struct  Access_t
 
struct  Access_t< ReturnType, false >
 
struct  Access_t< ReturnType, true >
 

Public Types

typedef TableRow< ReadOnly > Row
 
typedef TableRow< true > ConstRow
 
using value_type = idx_t
 
using Data = typename std::conditional< ReadOnly, const idx_t, idx_t >::type
 
using Access = Access_t< Index, ReadOnly >
 
using ConstAccess = Access_t< idx_t, true >
 

Public Member Functions

 TableView (const Table &table, bool host=true)
 
 TableView (const TableView &other)
 
TableView operator= (const TableView &other)
 
ATLAS_HOST_DEVICE size_t rows () const
 Number of rows in the connectivity table.
 
ATLAS_HOST_DEVICE size_t cols (size_t row_idx) const
 Number of columns for specified row in the connectivity table.
 
ATLAS_HOST_DEVICE size_t maxcols () const
 Maximum value for number of columns over all rows.
 
ATLAS_HOST_DEVICE size_t mincols () const
 Minimum value for number of columns over all rows.
 
ATLAS_HOST_DEVICE idx_t operator() (size_t row_idx, size_t col_idx) const
 Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined. More...
 
ATLAS_HOST_DEVICE Index operator() (size_t row_idx, size_t col_idx)
 Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined. More...
 
const idx_tdata () const
 Access to raw data. More...
 
Data * data ()
 
ATLAS_HOST_DEVICE size_t size () const
 
ATLAS_HOST_DEVICE idx_t missing_value () const
 
ATLAS_HOST_DEVICE ConstRow row (size_t row_idx) const
 
ATLAS_HOST_DEVICE Row row (size_t row_idx)
 
ATLAS_HOST_DEVICE size_t displs (const size_t row) const
 – Modifiers
 

Static Public Attributes

static constexpr unsigned short _values_ = 0
 
static constexpr unsigned short _displs_ = 1
 
static constexpr unsigned short _counts_ = 2
 

Member Function Documentation

◆ data()

template<bool ReadOnly>
const idx_t* atlas::array::TableView< ReadOnly >::data ( ) const
inline

Access to raw data.

Note that the connectivity base is 1 in case ATLAS_HAVE_FORTRAN is defined.

◆ operator()() [1/2]

template<bool ReadOnly>
ATLAS_HOST_DEVICE idx_t atlas::array::TableView< ReadOnly >::operator() ( size_t  row_idx,
size_t  col_idx 
) const
inline

Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined.

◆ operator()() [2/2]

template<bool ReadOnly>
ATLAS_HOST_DEVICE Index atlas::array::TableView< ReadOnly >::operator() ( size_t  row_idx,
size_t  col_idx 
)
inline

Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined.


The documentation for this class was generated from the following files: