22 #if !defined(__FLECSI_PRIVATE__) 23 #error Do not include this file directly! 33 template<
typename DATA_TYPE,
size_t PRIVILEGES>
35 using value_type = DATA_TYPE;
37 using element_type =
typename base_type::element_type;
41 element_type &
get()
const {
44 operator element_type &()
const {
48 const accessor & operator=(
const DATA_TYPE & value)
const {
49 return const_cast<accessor &
>(*this) = value;
51 accessor & operator=(
const DATA_TYPE & value) {
70 template<
typename DATA_TYPE,
size_t PRIVILEGES>
72 using value_type = DATA_TYPE;
73 using element_type = std::
74 conditional_t<privilege_write(PRIVILEGES), value_type, const value_type>;
90 element_type * data()
const {
95 friend void bind(
accessor & a,
size_t size, element_type * data) {
102 element_type * data_ =
nullptr;
108 template<
class T, std::
size_t S>
110 template<
class Topo, topo::index_space_t<Topo> Space>
116 template<
class T, std::
size_t S>
119 template<
class Topo, topo::index_space_t<Topo> Space>
122 return exec::replace_argument<typename type::base_type>(
123 r.template cast<data::dense>());
element_type & operator()(size_t index) const
Definition: accessor.hh:85
Definition: reference.hh:43
Access to the single element of an array.
Definition: layout.hh:39
#define flog_assert(test, message)
Definition: flog.hh:411
Definition: accessor.hh:71
Definition: control.hh:31