ReactOS  0.4.14-dev-342-gdc047f9
_Gslice_Iter_tmpl< _Size > Struct Template Reference

#include <_valarray.h>

Collaboration diagram for _Gslice_Iter_tmpl< _Size >:

Public Member Functions

 _Gslice_Iter_tmpl (const gslice &__gslice)
 
bool _M_done () const
 
bool _M_incr ()
 

Public Attributes

_Size _M_step
 
_Size _M_1d_idx
 
valarray< _Size_M_indices
 
const gslice_M_gslice
 

Detailed Description

template<class _Size>
struct _Gslice_Iter_tmpl< _Size >

Definition at line 1237 of file _valarray.h.

Constructor & Destructor Documentation

◆ _Gslice_Iter_tmpl()

template<class _Size >
_Gslice_Iter_tmpl< _Size >::_Gslice_Iter_tmpl ( const gslice __gslice)
inline

Definition at line 1284 of file _valarray.h.

1285  : _M_step(0), _M_1d_idx(__gslice.start()),
1286  _M_indices(size_t(0), __gslice._M_lengths.size()),
1287  _M_gslice(__gslice)
1288  {}
_Valarray_size_t _M_lengths
Definition: _valarray.h:1272
size_t start() const
Definition: _valarray.h:1249
size_t size() const
Definition: _valarray.h:164
const gslice & _M_gslice
Definition: _valarray.h:1298
valarray< _Size > _M_indices
Definition: _valarray.h:1297

Member Function Documentation

◆ _M_done()

template<class _Size >
bool _Gslice_Iter_tmpl< _Size >::_M_done ( ) const
inline

Definition at line 1290 of file _valarray.h.

1290 { return _M_indices[0] == _M_gslice._M_lengths[0]; }
_Valarray_size_t _M_lengths
Definition: _valarray.h:1272
const gslice & _M_gslice
Definition: _valarray.h:1298
valarray< _Size > _M_indices
Definition: _valarray.h:1297

◆ _M_incr()

template<class _Size >
bool _Gslice_Iter_tmpl< _Size >::_M_incr ( )

Definition at line 67 of file _valarray.c.

67  {
68  size_t __dim = _M_indices.size() - 1;
69  ++_M_step;
70  for (;;) {
71  _M_1d_idx += _M_gslice._M_strides[__dim];
72  if (++_M_indices[__dim] != _M_gslice._M_lengths[__dim])
73  return true;
74  else if (__dim != 0) {
76  _M_indices[__dim] = 0;
77  --__dim;
78  }
79  else
80  return false;
81  }
82 }
_Valarray_size_t _M_strides
Definition: _valarray.h:1273
_Valarray_size_t _M_lengths
Definition: _valarray.h:1272
size_t size() const
Definition: _valarray.h:164
const gslice & _M_gslice
Definition: _valarray.h:1298
valarray< _Size > _M_indices
Definition: _valarray.h:1297

Referenced by gslice_array< _Tp >::operator *=(), gslice_array< _Tp >::operator%=(), gslice_array< _Tp >::operator&=(), gslice_array< _Tp >::operator+=(), gslice_array< _Tp >::operator-=(), gslice_array< _Tp >::operator/=(), gslice_array< _Tp >::operator<<=(), valarray< bool >::operator=(), gslice_array< _Tp >::operator=(), gslice_array< _Tp >::operator>>=(), valarray< bool >::operator[](), gslice_array< _Tp >::operator^=(), and gslice_array< _Tp >::operator|=().

Member Data Documentation

◆ _M_1d_idx

◆ _M_gslice

template<class _Size >
const gslice& _Gslice_Iter_tmpl< _Size >::_M_gslice

Definition at line 1298 of file _valarray.h.

Referenced by _Gslice_Iter_tmpl< _Size >::_M_done().

◆ _M_indices

template<class _Size >
valarray<_Size> _Gslice_Iter_tmpl< _Size >::_M_indices

Definition at line 1297 of file _valarray.h.

Referenced by _Gslice_Iter_tmpl< _Size >::_M_done().

◆ _M_step


The documentation for this struct was generated from the following files: