|
|
@@ -107,15 +107,13 @@ public: |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
#if PTRDIFF_MAX > INT_MAX |
|
|
|
inline arraynd(vec_t<ptrdiff_t, N> sizes, element_t e = element_t()) |
|
|
|
: m_sizes(sizes) |
|
|
|
{ |
|
|
|
FixSizes(e); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if PTRDIFF_MAX != INT_MAX |
|
|
|
#if PTRDIFF_MAX > INT_MAX |
|
|
|
inline arraynd(vec_t<int, N> sizes, element_t e = element_t()) |
|
|
|
{ |
|
|
|
m_sizes = vec_t<ptrdiff_t, N>(sizes); |
|
|
@@ -123,7 +121,6 @@ public: |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
inline arraynd(std::initializer_list<arraynd_initializer<element_t, N - 1> > initializer) |
|
|
|
{ |
|
|
|
m_sizes[N - 1] = initializer.size(); |
|
|
@@ -140,7 +137,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/* Access elements directly using an vec_t<ptrdiff_t, N> index */ |
|
|
|
#if PTRDIFF_MAX > INT_MAX |
|
|
|
inline element_t const & operator[](vec_t<ptrdiff_t, N> const &pos) const |
|
|
|
{ |
|
|
|
ptrdiff_t n = pos[N - 1]; |
|
|
@@ -154,9 +150,8 @@ public: |
|
|
|
return const_cast<element_t &>( |
|
|
|
const_cast<arraynd<N, T...> const&>(*this)[pos]); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if PTRDIFF_MAX != INT_MAX |
|
|
|
#if PTRDIFF_MAX > INT_MAX |
|
|
|
/* Access elements directly using an ivec2, ivec3 etc. index */ |
|
|
|
inline element_t const & operator[](vec_t<int, N> const &pos) const |
|
|
|
{ |
|
|
@@ -237,15 +232,13 @@ public: |
|
|
|
|
|
|
|
/* Resize the array. |
|
|
|
* FIXME: data gets scrambled; should we care? */ |
|
|
|
#if PTRDIFF_MAX > INT_MAX |
|
|
|
inline void SetSize(vec_t<ptrdiff_t, N> sizes, element_t e = element_t()) |
|
|
|
{ |
|
|
|
m_sizes = sizes; |
|
|
|
FixSizes(e); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if PTRDIFF_MAX != INT_MAX |
|
|
|
#if PTRDIFF_MAX > INT_MAX |
|
|
|
inline void SetSize(vec_t<int, N> sizes, element_t e = element_t()) |
|
|
|
{ |
|
|
|
m_sizes = vec_t<ptrdiff_t, N>(sizes); |
|
|
|