28 #include "../error/exceptions.hpp"
29 #include "../error/exception_utils.hpp"
30 #include "../types/types.hpp"
31 #include "../arrays.hpp"
32 #include "array_holder.hpp"
33 #include "array_iterator.hpp"
34 #include "../algorithms.hpp"
94 "Instance of data_object holds no data!");
157 !std::is_same<
array,
typename
158 std::remove_reference<T>::type >
::value
182 !std::is_same<
array,
typename
183 std::remove_reference<T>::type >
::value
188 typename
std::remove_reference<T>::type>::type>
189 (
std::forward<T>(o)))
195 array(
const array &e);
239 shape_t
shape()
const;
252 template<
typename CTYPE> CTYPE
shape()
const;
366 const void *
data()
const;
377 shape_t s = this->
shape();
379 std::copy(s.begin(),s.end(),c.begin());
array(const T &o)
copy original object
Definition: array.hpp:161
string type_name() const
return the type name
exception record
Definition: exceptions.hpp:90
size_t size_type
type used for array size
Definition: array.hpp:126
array_holder_interface::element_index element_index
element index type
Definition: array.hpp:123
type erasure array types
Definition: array.hpp:74
const_iterator begin() const
get const iterator to first element
Definition: array.hpp:358
value value_type
value type of the array
Definition: array.hpp:119
value_ref operator()(const element_index &index)
get reference to element
array holder template
Definition: array_holder.hpp:57
std::vector< slice > view_index
view index type
Definition: array_holder_interface.hpp:45
type_id_t type_id() const
get type id
array_iterator< 1 > const_iterator
Definition: array.hpp:121
pointer_type _ptr
pointer to an instance of array_holder
Definition: array.hpp:116
shape_t shape() const
return shape
array()
default constructor
Definition: array.hpp:129
Definition: add_op.hpp:29
array_holder_interface::view_index view_index
view index type
Definition: array.hpp:125
array iterator
Definition: array_iterator.hpp:121
invoke< std::enable_if< C::value >> enable_if
shortcut for std::enable_if
Definition: sfinae_macros.hpp:108
array(T &&o)
move original object
Definition: array.hpp:186
array_iterator< 0 > iterator
read/write iterator
Definition: array.hpp:120
std::vector< size_t > element_index
single element index type
Definition: array_holder_interface.hpp:43
memory not allocated error
Definition: exceptions.hpp:321
std::unique_ptr< array_holder_interface > pointer_type
local pointer type used to hold the array
Definition: array.hpp:78
iterator end()
get iterator to last+1 element
Definition: array.hpp:354
size_t rank() const
return rank of array
const_iterator end() const
get const iterator to last+1 element
Definition: array.hpp:362
array & operator=(const array &a)
copy assignment operator
type_id_t type_id(const array &a)
get type id
const void * data() const
get const pointer to data
value operator[](size_t i) const
get value at index i
type_id_t
type codes for PNI data types
Definition: types/types.hpp:148
value at(size_t i) const
get value at index i
type erasure for references to POD data
Definition: value_ref.hpp:43
type erasure for POD data
Definition: value.hpp:46
static void _check_pointer(const pointer_type &ptr, const exception_record &r)
check pointer
Definition: array.hpp:108
static void _throw_not_allocated_error(const exception_record &r)
throw exception
Definition: array.hpp:91
iterator begin()
get iterator to first element
Definition: array.hpp:350
size_t size() const
return number of elements