23 #ifndef NDARRAY_ArrayTraits_h_INCLUDED
24 #define NDARRAY_ArrayTraits_h_INCLUDED
35 #include <boost/mpl/int.hpp>
36 #include <boost/mpl/bool.hpp>
41 template <
int N,
typename T2,
int C2,
typename T1,
int C1>
43 (((C2>=C1 && C1>=0) || (C2<=C1 && C1<=0) || (N == 1 && C2 == -C1))
44 && boost::is_convertible<T2*,T1*>::value)
55 template <
typename T,
int N,
int C>
58 typedef boost::mpl::int_<N>
ND;
59 typedef boost::mpl::int_<C>
RMC;
78 for (; iter != end; ++
iter) {
87 typedef boost::mpl::int_<1>
ND;
88 typedef boost::mpl::int_<0>
RMC;
102 std::fill(iter, end, value);
106 template <
typename T>
109 typedef boost::mpl::int_<1>
ND;
110 typedef boost::mpl::int_<1>
RMC;
124 std::fill(iter, end, value);
128 template <
typename T>
131 typedef boost::mpl::int_<1>
ND;
132 typedef boost::mpl::int_<-1>
RMC;
146 std::fill(iter, end, value);
150 template <
typename T,
int N,
int C>
156 template <
typename T,
int N,
int C>
164 #endif // !NDARRAY_ArrayTraits_h_INCLUDED
A proxy class for Array with deep assignment operators.
static Reference makeReference(Element *data, CorePtr const &core)
boost::mpl::int_< 1 > RMC
Dimension-specialized traits shared by Array and ArrayRef.
boost::mpl::false_ IsScalar
boost::mpl::int_< C > RMC
boost::intrusive_ptr< Core const > ConstPtr
const intrusive_ptr to Core
Forward declarations and default template parameters for ndarray.
boost::mpl::int_<-1 > RMC
static Reference makeReference(Element *data, CorePtr const &core)
static void fill(Iterator iter, Iterator const &end, Element value)
static Iterator makeIterator(Element *data, CorePtr const &core, int stride)
static void fill(Iterator iter, Iterator const &end, Element value)
detail::StridedIterator< Element > Iterator
static Iterator makeIterator(Element *data, CorePtr const &core, int stride)
boost::mpl::int_< 0 > RMC
static Reference makeReference(Element *data, CorePtr const &core)
static void fill(Iterator iter, Iterator const &end, Element value)
static Iterator makeIterator(Element *data, CorePtr const &core, int stride)
A multidimensional strided array.
ArrayRef< T, N-1,(N==C)?(N-1):((C >0)?C:0)> Reference
Array< T, N-1,(N==C)?(N-1):((C >0)?C:0)> Value
static Reference makeReference(Element *data, CorePtr const &core)
static Iterator makeIterator(Element *data, CorePtr const &core, int stride)
boost::mpl::false_ IsScalar
detail::NestedIterator< T, N, C > Iterator
static void fill(Iterator iter, Iterator const &end, Element value)