32#ifndef _GSLICE_ARRAY_H
33#define _GSLICE_ARRAY_H 1
35#pragma GCC system_header
37namespace std _GLIBCXX_VISIBILITY(default)
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
59 template<
typename _Tp>
63 typedef _Tp value_type;
135 template<
typename _Tp>
139 : _M_array(__a), _M_index(__i) {}
141 template<
typename _Tp>
144 : _M_array(__a._M_array), _M_index(__a._M_index) {}
146 template<
typename _Tp>
156 template<
typename _Tp>
161 _M_index.size(), __t);
164 template<
typename _Tp>
172 template<
typename _Tp>
177 std::__valarray_copy (__e, _M_index.size(), _M_array,
181#undef _DEFINE_VALARRAY_OPERATOR
182#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
183 template<typename _Tp> \
185 gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \
187 _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), \
188 _Array<_Tp>(__v), __v.size()); \
191 template<typename _Tp> \
192 template<class _Dom> \
194 gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\
196 _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), __e,\
200_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
201_DEFINE_VALARRAY_OPERATOR(/, __divides)
202_DEFINE_VALARRAY_OPERATOR(%, __modulus)
203_DEFINE_VALARRAY_OPERATOR(+, __plus)
204_DEFINE_VALARRAY_OPERATOR(-, __minus)
205_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
206_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
207_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
208_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
209_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
211#undef _DEFINE_VALARRAY_OPERATOR
215_GLIBCXX_END_NAMESPACE_VERSION
void operator<<=(const valarray< _Tp > &) const
Left shift slice elements by corresponding elements of v.
void operator/=(const valarray< _Tp > &) const
Divide slice elements by corresponding elements of v.
void operator%=(const valarray< _Tp > &) const
Modulo slice elements by corresponding elements of v.
void operator>>=(const valarray< _Tp > &) const
Right shift slice elements by corresponding elements of v.
void operator*=(const valarray< _Tp > &) const
Multiply slice elements by corresponding elements of v.
void operator|=(const valarray< _Tp > &) const
Logical or slice elements with corresponding elements of v.
void operator^=(const valarray< _Tp > &) const
Logical xor slice elements with corresponding elements of v.
void operator-=(const valarray< _Tp > &) const
Subtract corresponding elements of v from slice elements.
void operator+=(const valarray< _Tp > &) const
Add corresponding elements of v to slice elements.
void operator&=(const valarray< _Tp > &) const
Logical and slice elements with corresponding elements of v.
gslice_array & operator=(const gslice_array &)
Assignment operator. Assigns slice elements to corresponding elements of a.
ISO C++ entities toplevel namespace is std.
Smart array designed to support numeric processing.
Reference to multi-dimensional subset of an array.