|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75382 - sandbox/variadic_templates/sandbox/stepper/boost/array_stepper
From: cppljevans_at_[hidden]
Date: 2011-11-07 09:45:10
Author: cppljevans
Date: 2011-11-07 09:45:09 EST (Mon, 07 Nov 2011)
New Revision: 75382
URL: http://svn.boost.org/trac/boost/changeset/75382
Log:
1) Minor renaming.
2) Added member function, indices_at_offset.
Text files modified:
sandbox/variadic_templates/sandbox/stepper/boost/array_stepper/index_stack_length_stride_crtp.hpp | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
Modified: sandbox/variadic_templates/sandbox/stepper/boost/array_stepper/index_stack_length_stride_crtp.hpp
==============================================================================
--- sandbox/variadic_templates/sandbox/stepper/boost/array_stepper/index_stack_length_stride_crtp.hpp (original)
+++ sandbox/variadic_templates/sandbox/stepper/boost/array_stepper/index_stack_length_stride_crtp.hpp 2011-11-07 09:45:09 EST (Mon, 07 Nov 2011)
@@ -356,6 +356,23 @@
}
return indices_v;
}
+ indices_t
+ indices_at_offset
+ ( typename length_strides_offset_t::offset_t a_offset
+ )const
+ /**@brief
+ * Indices corresponding to offset, a_offset.
+ */
+ {
+ return ::boost::array_stepper::indices_at_offset
+ < indices_t
+ >
+ ( my_lsi
+ , my_lsi+rank()
+ , typename length_strides_offset_t::get_length_stride()
+ , a_offset
+ );
+ }
};
};
@@ -644,8 +661,15 @@
auto index_lower=ibs.template bound<index_bound_lower>();
axis_index_put(a_axis,index_lower);
if(l_old==l_new)return;
- my_space/=l_old;
- my_space*=l_new;
+ if(my_space==0)
+ {
+ my_space=this->ctor_space();
+ }
+ else
+ {
+ my_space/=l_old;
+ my_space*=l_new;
+ }
}
void
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk