diff --git a/include/boost/multi_array.hpp b/include/boost/multi_array.hpp index c9ed215..228f3df 100644 --- a/include/boost/multi_array.hpp +++ b/include/boost/multi_array.hpp @@ -158,7 +158,7 @@ public: template explicit multi_array( - ExtentList const& extents, + ExtentList const& _extents, const Allocator& alloc = Allocator() #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING , typename mpl::if_< @@ -166,7 +166,7 @@ public: int&,int>::type* = 0 #endif ) : - super_type((T*)initial_base_,extents), + super_type((T*)initial_base_,_extents), alloc_base(boost::empty_init_t(),alloc) { boost::function_requires< detail::multi_array::CollectionConcept >(); @@ -175,9 +175,9 @@ public: template - explicit multi_array(ExtentList const& extents, + explicit multi_array(ExtentList const& _extents, const general_storage_order& so) : - super_type((T*)initial_base_,extents,so), + super_type((T*)initial_base_,_extents,so), alloc_base(boost::empty_init_t()) { boost::function_requires< detail::multi_array::CollectionConcept >(); @@ -185,10 +185,10 @@ public: } template - explicit multi_array(ExtentList const& extents, + explicit multi_array(ExtentList const& _extents, const general_storage_order& so, Allocator const& alloc) : - super_type((T*)initial_base_,extents,so), + super_type((T*)initial_base_,_extents,so), alloc_base(boost::empty_init_t(),alloc) { boost::function_requires< detail::multi_array::CollectionConcept >(); @@ -433,7 +433,7 @@ public: template - multi_array& resize(const ExtentList& extents) { + multi_array& resize(const ExtentList& _extents) { boost::function_requires< detail::multi_array::CollectionConcept >(); @@ -442,7 +442,7 @@ public: for (int i=0; i != NumDims; ++i) { typedef typename gen_type::range range_type; - ranges.ranges_[i] = range_type(0,extents[i]); + ranges.ranges_[i] = range_type(0,_extents[i]); } return this->resize(ranges); diff --git a/include/boost/multi_array/base.hpp b/include/boost/multi_array/base.hpp index 4e621e1..4a37f8f 100644 --- a/include/boost/multi_array/base.hpp +++ b/include/boost/multi_array/base.hpp @@ -128,15 +128,15 @@ protected: // used by array operator[] and iterators to get reference types. template Reference access(boost::type,index idx,TPtr base, - const size_type* extents, + const size_type* _extents, const index* strides, const index* index_bases) const { BOOST_ASSERT(idx - index_bases[0] >= 0); - BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]); + BOOST_ASSERT(size_type(idx - index_bases[0]) < _extents[0]); // return a sub_array proxy object TPtr newbase = base + idx * strides[0]; - return Reference(newbase,extents+1,strides+1,index_bases+1); + return Reference(newbase,_extents+1,strides+1,index_bases+1); } @@ -168,14 +168,14 @@ protected: // used by array operator[] and iterators to get reference types. template Reference access(boost::type,index idx,TPtr base, - const size_type* extents, + const size_type* _extents, const index* strides, const index* index_bases) const { ignore_unused_variable_warning(index_bases); - ignore_unused_variable_warning(extents); + ignore_unused_variable_warning(_extents); BOOST_ASSERT(idx - index_bases[0] >= 0); - BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]); + BOOST_ASSERT(size_type(idx - index_bases[0]) < _extents[0]); return *(base + idx * strides[0]); } @@ -299,17 +299,17 @@ protected: Reference access_element(boost::type, const IndexList& indices, TPtr base, - const size_type* extents, + const size_type* _extents, const index* strides, const index* index_bases) const { boost::function_requires< CollectionConcept >(); ignore_unused_variable_warning(index_bases); - ignore_unused_variable_warning(extents); + ignore_unused_variable_warning(_extents); #if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS) for (size_type i = 0; i != NumDims; ++i) { BOOST_ASSERT(indices[i] - index_bases[i] >= 0); - BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < extents[i]); + BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < _extents[i]); } #endif @@ -408,7 +408,7 @@ protected: generate_array_view(boost::type, const boost::detail::multi_array:: index_gen& indices, - const size_type* extents, + const size_type* _extents, const index* strides, const index* index_bases, TPtr base) const { @@ -422,7 +422,7 @@ protected: // Use array specs and input specs to produce real specs. const index default_start = index_bases[n]; - const index default_finish = default_start+extents[n]; + const index default_finish = default_start+_extents[n]; const index_range& current_range = indices.ranges_[n]; index start = current_range.get_start(default_start); index finish = current_range.get_finish(default_finish); @@ -453,8 +453,8 @@ protected: // exactly in the set of legal indices // with a special case for empty arrays BOOST_ASSERT(index_bases[n] <= start && - ((start <= index_bases[n]+index(extents[n])) || - (start == index_bases[n] && extents[n] == 0))); + ((start <= index_bases[n]+index(_extents[n])) || + (start == index_bases[n] && _extents[n] == 0))); #ifndef BOOST_DISABLE_ASSERTS // finish marks the open side of the range, so it can go one past @@ -462,7 +462,7 @@ protected: // if stride is negative). index bound_adjustment = stride < 0 ? 1 : 0; BOOST_ASSERT(((index_bases[n] - bound_adjustment) <= finish) && - (finish <= (index_bases[n] + index(extents[n]) - bound_adjustment))); + (finish <= (index_bases[n] + index(_extents[n]) - bound_adjustment))); ignore_unused_variable_warning(bound_adjustment); #endif // BOOST_DISABLE_ASSERTS diff --git a/include/boost/multi_array/iterator.hpp b/include/boost/multi_array/iterator.hpp index ec5e61c..38fc9ee 100644 --- a/include/boost/multi_array/iterator.hpp +++ b/include/boost/multi_array/iterator.hpp @@ -94,10 +94,10 @@ public: array_iterator() {} - array_iterator(index idx, TPtr base, const size_type* extents, + array_iterator(index idx, TPtr base, const size_type* _extents, const index* strides, const index* index_base) : - idx_(idx), base_(base), extents_(extents), + idx_(idx), base_(base), extents_(_extents), strides_(strides), index_base_(index_base) { } template diff --git a/include/boost/multi_array/multi_array_ref.hpp b/include/boost/multi_array/multi_array_ref.hpp index 98c10c0..bf02304 100644 --- a/include/boost/multi_array/multi_array_ref.hpp +++ b/include/boost/multi_array/multi_array_ref.hpp @@ -87,24 +87,24 @@ public: num_elements_(other.num_elements_) { } template - explicit const_multi_array_ref(TPtr base, const ExtentList& extents) : + explicit const_multi_array_ref(TPtr base, const ExtentList& _extents) : base_(base), storage_(c_storage_order()) { boost::function_requires< CollectionConcept >(); index_base_list_.assign(0); - init_multi_array_ref(extents.begin()); + init_multi_array_ref(_extents.begin()); } template - explicit const_multi_array_ref(TPtr base, const ExtentList& extents, + explicit const_multi_array_ref(TPtr base, const ExtentList& _extents, const general_storage_order& so) : base_(base), storage_(so) { boost::function_requires< CollectionConcept >(); index_base_list_.assign(0); - init_multi_array_ref(extents.begin()); + init_multi_array_ref(_extents.begin()); } explicit const_multi_array_ref(TPtr base, @@ -162,14 +162,14 @@ public: } template - void reshape(const SizeList& extents) { + void reshape(const SizeList& _extents) { boost::function_requires< CollectionConcept >(); BOOST_ASSERT(num_elements_ == - std::accumulate(extents.begin(),extents.end(), + std::accumulate(_extents.begin(),_extents.end(), size_type(1),std::multiplies())); - std::copy(extents.begin(),extents.end(),extent_list_.begin()); + std::copy(_extents.begin(),_extents.end(),extent_list_.begin()); this->compute_strides(stride_list_,extent_list_,storage_); origin_offset_ = @@ -325,7 +325,7 @@ public: const_multi_array_ref(TPtr base, const storage_order_type& so, const index * index_bases, - const size_type* extents) : + const size_type* _extents) : base_(base), storage_(so), origin_offset_(0), directional_offset_(0) { // If index_bases or extents is null, then initialize the corresponding @@ -336,8 +336,8 @@ public: } else { std::fill_n(index_base_list_.begin(),NumDims,0); } - if(extents) { - init_multi_array_ref(extents); + if(_extents) { + init_multi_array_ref(_extents); } else { boost::array extent_list; extent_list.assign(0); @@ -371,12 +371,12 @@ private: boost::mem_fun_ref(&extent_range::start)); // calculate the extents - extent_list extents; + extent_list _extents; std::transform(ranges.ranges_.begin(),ranges.ranges_.end(), - extents.begin(), + _extents.begin(), boost::mem_fun_ref(&extent_range::size)); - init_multi_array_ref(extents.begin()); + init_multi_array_ref(_extents.begin()); } @@ -442,16 +442,16 @@ public: }; template - explicit multi_array_ref(T* base, const ExtentList& extents) : - super_type(base,extents) { + explicit multi_array_ref(T* base, const ExtentList& _extents) : + super_type(base,_extents) { boost::function_requires< CollectionConcept >(); } template - explicit multi_array_ref(T* base, const ExtentList& extents, + explicit multi_array_ref(T* base, const ExtentList& _extents, const general_storage_order& so) : - super_type(base,extents,so) { + super_type(base,_extents,so) { boost::function_requires< CollectionConcept >(); } @@ -612,8 +612,8 @@ protected: explicit multi_array_ref(T* base, const storage_order_type& so, const index* index_bases, - const size_type* extents) : - super_type(base,so,index_bases,extents) { } + const size_type* _extents) : + super_type(base,so,index_bases,_extents) { } }; diff --git a/include/boost/multi_array/subarray.hpp b/include/boost/multi_array/subarray.hpp index 2cb30d7..007e77c 100644 --- a/include/boost/multi_array/subarray.hpp +++ b/include/boost/multi_array/subarray.hpp @@ -176,10 +176,10 @@ public: // Should be protected #endif const_sub_array (TPtr base, - const size_type* extents, + const size_type* _extents, const index* strides, const index* index_base) : - base_(base), extents_(extents), strides_(strides), + base_(base), extents_(_extents), strides_(strides), index_base_(index_base) { } @@ -356,10 +356,10 @@ public: // should be private #endif sub_array (T* base, - const size_type* extents, + const size_type* _extents, const index* strides, const index* index_base) : - super_type(base,extents,strides,index_base) { + super_type(base,_extents,strides,index_base) { } }; diff --git a/include/boost/multi_array/view.hpp b/include/boost/multi_array/view.hpp index e637911..8cac207 100644 --- a/include/boost/multi_array/view.hpp +++ b/include/boost/multi_array/view.hpp @@ -227,7 +227,7 @@ public: // should be protected // to create strides template explicit const_multi_array_view(TPtr base, - const ExtentList& extents, + const ExtentList& _extents, const boost::array& strides): base_(base), origin_offset_(0) { @@ -235,7 +235,7 @@ public: // should be protected // Get the extents and strides boost::detail::multi_array:: - copy_n(extents.begin(),NumDims,extent_list_.begin()); + copy_n(_extents.begin(),NumDims,extent_list_.begin()); boost::detail::multi_array:: copy_n(strides.begin(),NumDims,stride_list_.begin()); @@ -429,9 +429,9 @@ public: // should be private // generate array views template explicit multi_array_view(T* base, - const ExtentList& extents, + const ExtentList& _extents, const boost::array& strides) : - super_type(base,extents,strides) { } + super_type(base,_extents,strides) { } };