Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59745 - sandbox/numeric_bindings/boost/numeric/bindings
From: rutger_at_[hidden]
Date: 2010-02-18 07:19:43


Author: rutger
Date: 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
New Revision: 59745
URL: http://svn.boost.org/trac/boost/changeset/59745

Log:
Renamed tag::index<> to tag::addressing_index<>, to clear the way for sparse matrix structures and their index arrays.

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/addressing_index.hpp
      - copied, changed from r59689, /sandbox/numeric_bindings/boost/numeric/bindings/index.hpp
Removed:
   sandbox/numeric_bindings/boost/numeric/bindings/index.hpp
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/addressing_index.hpp | 34 ++++++++++++++--------------
   sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp | 46 ++++++++++++++++++++--------------------
   sandbox/numeric_bindings/boost/numeric/bindings/begin.hpp | 16 ++++++------
   sandbox/numeric_bindings/boost/numeric/bindings/end.hpp | 16 ++++++------
   sandbox/numeric_bindings/boost/numeric/bindings/size.hpp | 42 ++++++++++++++++++------------------
   sandbox/numeric_bindings/boost/numeric/bindings/stride.hpp | 46 ++++++++++++++++++++--------------------
   sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp | 2
   7 files changed, 101 insertions(+), 101 deletions(-)

Copied: sandbox/numeric_bindings/boost/numeric/bindings/addressing_index.hpp (from r59689, /sandbox/numeric_bindings/boost/numeric/bindings/index.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/index.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/addressing_index.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -19,49 +19,49 @@
 namespace bindings {
 
 template< typename T >
-struct index_minor:
+struct addressing_index_minor:
     mpl::if_<
         is_column_major< T >,
- tag::index<1>,
- tag::index<
+ tag::addressing_index<1>,
+ tag::addressing_index<
             mpl::max< tag::matrix, rank< T > >::type::value
>
>::type {};
 
 template< typename T >
-struct index_major:
+struct addressing_index_major:
     mpl::if_<
         is_column_major< T >,
- tag::index<
+ tag::addressing_index<
             mpl::max< tag::matrix, rank< T > >::type::value
>,
- tag::index<1>
+ tag::addressing_index<1>
>::type {};
 
 
-template< typename Index, typename TransTag >
-struct index_trans {
- typedef Index type;
+template< typename AddressingIndex, typename TransTag >
+struct addressing_index_trans {
+ typedef AddressingIndex type;
 };
 
 template<>
-struct index_trans< tag::index<1>, tag::transpose > {
- typedef tag::index<2> type;
+struct addressing_index_trans< tag::addressing_index<1>, tag::transpose > {
+ typedef tag::addressing_index<2> type;
 };
 
 template<>
-struct index_trans< tag::index<1>, tag::conjugate > {
- typedef tag::index<2> type;
+struct addressing_index_trans< tag::addressing_index<1>, tag::conjugate > {
+ typedef tag::addressing_index<2> type;
 };
 
 template<>
-struct index_trans< tag::index<2>, tag::transpose > {
- typedef tag::index<1> type;
+struct addressing_index_trans< tag::addressing_index<2>, tag::transpose > {
+ typedef tag::addressing_index<1> type;
 };
 
 template<>
-struct index_trans< tag::index<2>, tag::conjugate > {
- typedef tag::index<1> type;
+struct addressing_index_trans< tag::addressing_index<2>, tag::conjugate > {
+ typedef tag::addressing_index<1> type;
 };
 
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -12,7 +12,7 @@
 #include <boost/numeric/bindings/detail/generate_functions.hpp>
 #include <boost/numeric/bindings/detail/get.hpp>
 #include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/index.hpp>
+#include <boost/numeric/bindings/addressing_index.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/min.hpp>
 #include <boost/mpl/greater.hpp>
@@ -24,10 +24,10 @@
 namespace bindings {
 namespace detail {
 
-template< typename T, typename Index, typename Enable = void >
+template< typename T, typename AddressingIndex, typename Enable = void >
 struct bandwidth_impl {
 
- typedef typename tag::bandwidth_type< Index::value > key_type;
+ typedef typename tag::bandwidth_type< AddressingIndex::value > key_type;
     typedef typename result_of_get< T, key_type >::type result_type;
 
     static result_type invoke( const T& t ) {
@@ -38,33 +38,33 @@
 
 template< typename T >
 struct bandwidth_impl< T, tag::lower >:
- bandwidth_impl< T, tag::index<1> > {};
+ bandwidth_impl< T, tag::addressing_index<1> > {};
 
 
 template< typename T >
 struct bandwidth_impl< T, tag::upper >:
- bandwidth_impl< T, tag::index<2> > {};
+ bandwidth_impl< T, tag::addressing_index<2> > {};
 
 
 template< typename T, int N >
-struct bandwidth_impl< T, tag::index<N>,
+struct bandwidth_impl< T, tag::addressing_index<N>,
         typename boost::enable_if< typename mpl::and_<
- mpl::greater< tag::index<N>, rank<T> >,
+ mpl::greater< tag::addressing_index<N>, rank<T> >,
             is_same_at< T, tag::bandwidth_type<1>, std::ptrdiff_t >
>::type >::type > {
 
     typedef std::ptrdiff_t result_type;
 
     static result_type invoke( const T& t ) {
- return std::min< std::ptrdiff_t >( bandwidth_impl<T, tag::index<1> >::invoke(t), 1 );
+ return std::min< std::ptrdiff_t >( bandwidth_impl<T, tag::addressing_index<1> >::invoke(t), 1 );
     }
 
 };
 
 template< typename T, int N >
-struct bandwidth_impl< T, tag::index<N>,
+struct bandwidth_impl< T, tag::addressing_index<N>,
         typename boost::enable_if< typename mpl::and_<
- mpl::greater< tag::index<N>, rank<T> >,
+ mpl::greater< tag::addressing_index<N>, rank<T> >,
             mpl::not_< is_same_at< T, tag::bandwidth_type<1>, std::ptrdiff_t > >
>::type >::type > {
 
@@ -84,7 +84,7 @@
 
 namespace result_of {
 
-template< typename T, typename Tag = tag::index<1> >
+template< typename T, typename Tag = tag::addressing_index<1> >
 struct bandwidth {
     BOOST_STATIC_ASSERT( (is_tag<Tag>::value) );
     typedef typename detail::bandwidth_impl< T, Tag >::result_type type;
@@ -110,20 +110,20 @@
 // typename boost::enable_if< mpl::less< rank<T>, mpl::int_<2> >,
 // typename result_of::bandwidth< const T >::type >::type
 // bandwidth( const T& t ) {
-// return detail::bandwidth_impl< const T, tag::index<1> >::invoke( t );
+// return detail::bandwidth_impl< const T, tag::addressing_index<1> >::invoke( t );
 // }
 
 #define GENERATE_BANDWIDTH_INDEX( z, which, unused ) \
-GENERATE_FUNCTIONS( bandwidth, which, tag::index<which> )
+GENERATE_FUNCTIONS( bandwidth, which, tag::addressing_index<which> )
 
 BOOST_PP_REPEAT_FROM_TO(1,3,GENERATE_BANDWIDTH_INDEX,~)
 
-GENERATE_FUNCTIONS( bandwidth, _left, tag::index<1> )
-GENERATE_FUNCTIONS( bandwidth, _right, tag::index<2> )
-GENERATE_FUNCTIONS( bandwidth, _lower, tag::index<1> )
-GENERATE_FUNCTIONS( bandwidth, _upper, tag::index<2> )
-GENERATE_FUNCTIONS( bandwidth, _major, typename index_major<T>::type )
-GENERATE_FUNCTIONS( bandwidth, _minor, typename index_minor<T>::type )
+GENERATE_FUNCTIONS( bandwidth, _left, tag::addressing_index<1> )
+GENERATE_FUNCTIONS( bandwidth, _right, tag::addressing_index<2> )
+GENERATE_FUNCTIONS( bandwidth, _lower, tag::addressing_index<1> )
+GENERATE_FUNCTIONS( bandwidth, _upper, tag::addressing_index<2> )
+GENERATE_FUNCTIONS( bandwidth, _major, typename addressing_index_major<T>::type )
+GENERATE_FUNCTIONS( bandwidth, _minor, typename addressing_index_minor<T>::type )
 
 //
 // Overloads for free template functions bandwidth_row( x, tag ),
@@ -136,14 +136,14 @@
 struct bandwidth_upper_op {
     typedef typename bandwidth<
         T,
- typename index_trans< tag::index<1>, TransTag >::type
+ typename addressing_index_trans< tag::addressing_index<1>, TransTag >::type
>::type type;
 };
 
 template< typename T, typename TransTag >
 struct bandwidth_lower_op {
     typedef typename bandwidth< T,
- typename index_trans< tag::index<2>, TransTag >::type >::type type;
+ typename addressing_index_trans< tag::addressing_index<2>, TransTag >::type >::type type;
 };
 
 } // namespace result_of
@@ -151,13 +151,13 @@
 template< typename T, typename Tag >
 inline typename result_of::bandwidth_upper_op< const T, Tag >::type
 bandwidth_upper_op( const T& t, Tag ) {
- return bindings::bandwidth( t, typename index_trans< tag::index<1>, Tag >::type() );
+ return bindings::bandwidth( t, typename addressing_index_trans< tag::addressing_index<1>, Tag >::type() );
 }
 
 template< typename T, typename Tag >
 inline typename result_of::bandwidth_upper_op< const T, Tag >::type
 bandwidth_lower_op( const T& t, Tag ) {
- return bindings::bandwidth( t, typename index_trans< tag::index<2>, Tag >::type() );
+ return bindings::bandwidth( t, typename addressing_index_trans< tag::addressing_index<2>, Tag >::type() );
 }
 
 } // namespace bindings

Modified: sandbox/numeric_bindings/boost/numeric/bindings/begin.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/begin.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/begin.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -37,9 +37,9 @@
 };
 
 template< typename T, int Dimension >
-struct begin_impl<T, tag::index<Dimension> > {
+struct begin_impl<T, tag::addressing_index<Dimension> > {
 
- typedef tag::index<Dimension> tag_type;
+ typedef tag::addressing_index<Dimension> tag_type;
 
     typedef linear_iterator<
         typename bindings::value_type< T>::type,
@@ -56,7 +56,7 @@
 
 namespace result_of {
 
-template< typename T, typename Tag = tag::index<1> >
+template< typename T, typename Tag = tag::addressing_index<1> >
 struct begin {
     BOOST_STATIC_ASSERT( (is_tag<Tag>::value) );
     typedef typename detail::begin_impl<T,Tag>::result_type type;
@@ -91,23 +91,23 @@
 typename boost::enable_if< mpl::less< rank<T>, mpl::int_<2> >,
     typename result_of::begin< T >::type >::type
 begin( T& t ) {
- return detail::begin_impl< T, tag::index<1> >::invoke( t );
+ return detail::begin_impl< T, tag::addressing_index<1> >::invoke( t );
 }
 
 template< typename T >
 typename boost::enable_if< mpl::less< rank<T>, mpl::int_<2> >,
     typename result_of::begin< const T >::type >::type
 begin( const T& t ) {
- return detail::begin_impl< const T, tag::index<1> >::invoke( t );
+ return detail::begin_impl< const T, tag::addressing_index<1> >::invoke( t );
 }
 
 #define GENERATE_BEGIN_INDEX( z, which, unused ) \
-GENERATE_FUNCTIONS( begin, which, tag::index<which> )
+GENERATE_FUNCTIONS( begin, which, tag::addressing_index<which> )
 
 BOOST_PP_REPEAT_FROM_TO(1,3,GENERATE_BEGIN_INDEX,~)
 GENERATE_FUNCTIONS( begin, _value, tag::value )
-GENERATE_FUNCTIONS( begin, _row, tag::index<1> )
-GENERATE_FUNCTIONS( begin, _column, tag::index<2> )
+GENERATE_FUNCTIONS( begin, _row, tag::addressing_index<1> )
+GENERATE_FUNCTIONS( begin, _column, tag::addressing_index<2> )
 
 } // namespace bindings
 } // namespace numeric

Modified: sandbox/numeric_bindings/boost/numeric/bindings/end.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/end.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/end.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -31,9 +31,9 @@
 };
 
 template< typename T, int N >
-struct end_impl< T, tag::index<N> > {
+struct end_impl< T, tag::addressing_index<N> > {
 
- typedef tag::index<N> tag_type;
+ typedef tag::addressing_index<N> tag_type;
 
     typedef linear_iterator<
         typename bindings::value_type< T>::type,
@@ -50,7 +50,7 @@
 
 namespace result_of {
 
-template< typename T, typename Tag = tag::index<1> >
+template< typename T, typename Tag = tag::addressing_index<1> >
 struct end {
     BOOST_STATIC_ASSERT( (is_tag<Tag>::value) );
     typedef typename detail::end_impl<T,Tag>::result_type type;
@@ -82,16 +82,16 @@
 
 template< typename T >
 typename boost::enable_if< mpl::less< rank<T>, mpl::int_<2> >,
- typename result_of::end< T, tag::index<1> >::type >::type
+ typename result_of::end< T, tag::addressing_index<1> >::type >::type
 end( T& t ) {
- return detail::end_impl<T,tag::index<1> >::invoke( t );
+ return detail::end_impl<T,tag::addressing_index<1> >::invoke( t );
 }
 
 template< typename T >
 typename boost::enable_if< mpl::less< rank<T>, mpl::int_<2> >,
     typename result_of::end< const T >::type >::type
 end( const T& t ) {
- return detail::end_impl<const T, tag::index<1> >::invoke( t );
+ return detail::end_impl<const T, tag::addressing_index<1> >::invoke( t );
 }
 
 #define GENERATE_END_INDEX( z, which, unused ) \
@@ -99,8 +99,8 @@
 
 BOOST_PP_REPEAT_FROM_TO(1,3,GENERATE_END_INDEX,~)
 GENERATE_FUNCTIONS( end, _value, tag::value )
-GENERATE_FUNCTIONS( end, _row, tag::index<1> )
-GENERATE_FUNCTIONS( end, _column, tag::index<2> )
+GENERATE_FUNCTIONS( end, _row, tag::addressing_index<1> )
+GENERATE_FUNCTIONS( end, _column, tag::addressing_index<2> )
 
 
 } // namespace bindings

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/index.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/index.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
+++ (empty file)
@@ -1,72 +0,0 @@
-//
-// Copyright (c) 2009 by Rutger ter Borg
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_NUMERIC_BINDINGS_INDEX_HPP
-#define BOOST_NUMERIC_BINDINGS_INDEX_HPP
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/max.hpp>
-#include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/is_column_major.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-
-template< typename T >
-struct index_minor:
- mpl::if_<
- is_column_major< T >,
- tag::index<1>,
- tag::index<
- mpl::max< tag::matrix, rank< T > >::type::value
- >
- >::type {};
-
-template< typename T >
-struct index_major:
- mpl::if_<
- is_column_major< T >,
- tag::index<
- mpl::max< tag::matrix, rank< T > >::type::value
- >,
- tag::index<1>
- >::type {};
-
-
-template< typename Index, typename TransTag >
-struct index_trans {
- typedef Index type;
-};
-
-template<>
-struct index_trans< tag::index<1>, tag::transpose > {
- typedef tag::index<2> type;
-};
-
-template<>
-struct index_trans< tag::index<1>, tag::conjugate > {
- typedef tag::index<2> type;
-};
-
-template<>
-struct index_trans< tag::index<2>, tag::transpose > {
- typedef tag::index<1> type;
-};
-
-template<>
-struct index_trans< tag::index<2>, tag::conjugate > {
- typedef tag::index<1> type;
-};
-
-
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Modified: sandbox/numeric_bindings/boost/numeric/bindings/size.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/size.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/size.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -12,7 +12,7 @@
 #include <boost/numeric/bindings/detail/generate_functions.hpp>
 #include <boost/numeric/bindings/detail/get.hpp>
 #include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/index.hpp>
+#include <boost/numeric/bindings/addressing_index.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/min.hpp>
 #include <boost/mpl/greater.hpp>
@@ -24,10 +24,10 @@
 namespace bindings {
 namespace detail {
 
-template< typename T, typename Index, typename Enable = void >
+template< typename T, typename AddressingIndex, typename Enable = void >
 struct size_impl {
 
- typedef typename tag::size_type< Index::value > key_type;
+ typedef typename tag::size_type< AddressingIndex::value > key_type;
     typedef typename result_of_get< T, key_type >::type result_type;
 
     static result_type invoke( const T& t ) {
@@ -36,25 +36,25 @@
 
 };
 
-template< typename T, typename Index >
-struct size_impl< T, Index,
+template< typename T, typename AddressingIndex >
+struct size_impl< T, AddressingIndex,
         typename boost::enable_if< typename mpl::and_<
- mpl::greater< Index, rank<T> >,
+ mpl::greater< AddressingIndex, rank<T> >,
             is_same_at< T, tag::size_type<1>, std::ptrdiff_t >
>::type >::type > {
 
     typedef std::ptrdiff_t result_type;
 
     static result_type invoke( const T& t ) {
- return std::min< std::ptrdiff_t >( size_impl<T, tag::index<1> >::invoke(t), 1 );
+ return std::min< std::ptrdiff_t >( size_impl<T, tag::addressing_index<1> >::invoke(t), 1 );
     }
 
 };
 
-template< typename T, typename Index >
-struct size_impl< T, Index,
+template< typename T, typename AddressingIndex >
+struct size_impl< T, AddressingIndex,
         typename boost::enable_if< typename mpl::and_<
- mpl::greater< Index, rank<T> >,
+ mpl::greater< AddressingIndex, rank<T> >,
             mpl::not_< is_same_at< T, tag::size_type<1>, std::ptrdiff_t > >
>::type >::type > {
 
@@ -74,7 +74,7 @@
 
 namespace result_of {
 
-template< typename T, typename Tag = tag::index<1> >
+template< typename T, typename Tag = tag::addressing_index<1> >
 struct size {
     BOOST_STATIC_ASSERT( (is_tag<Tag>::value) );
     typedef typename detail::size_impl< T, Tag >::result_type type;
@@ -100,18 +100,18 @@
 typename boost::enable_if< mpl::less< rank<T>, mpl::int_<2> >,
     typename result_of::size< const T >::type >::type
 size( const T& t ) {
- return detail::size_impl< const T, tag::index<1> >::invoke( t );
+ return detail::size_impl< const T, tag::addressing_index<1> >::invoke( t );
 }
 
 #define GENERATE_SIZE_INDEX( z, which, unused ) \
-GENERATE_FUNCTIONS( size, which, tag::index<which> )
+GENERATE_FUNCTIONS( size, which, tag::addressing_index<which> )
 
 BOOST_PP_REPEAT_FROM_TO(1,3,GENERATE_SIZE_INDEX,~)
 
-GENERATE_FUNCTIONS( size, _row, tag::index<1> )
-GENERATE_FUNCTIONS( size, _column, tag::index<2> )
-GENERATE_FUNCTIONS( size, _major, typename index_major<T>::type )
-GENERATE_FUNCTIONS( size, _minor, typename index_minor<T>::type )
+GENERATE_FUNCTIONS( size, _row, tag::addressing_index<1> )
+GENERATE_FUNCTIONS( size, _column, tag::addressing_index<2> )
+GENERATE_FUNCTIONS( size, _major, typename addressing_index_major<T>::type )
+GENERATE_FUNCTIONS( size, _minor, typename addressing_index_minor<T>::type )
 
 //
 // Overloads for free template functions size_row( x, tag ),
@@ -124,14 +124,14 @@
 struct size_row_op {
     typedef typename size<
         T,
- typename index_trans< tag::index<1>, TransTag >::type
+ typename addressing_index_trans< tag::addressing_index<1>, TransTag >::type
>::type type;
 };
 
 template< typename T, typename TransTag >
 struct size_column_op {
     typedef typename size< T,
- typename index_trans< tag::index<2>, TransTag >::type >::type type;
+ typename addressing_index_trans< tag::addressing_index<2>, TransTag >::type >::type type;
 };
 
 } // namespace result_of
@@ -139,13 +139,13 @@
 template< typename T, typename Tag >
 inline typename result_of::size_row_op< const T, Tag >::type
 size_row_op( const T& t, Tag ) {
- return bindings::size( t, typename index_trans< tag::index<1>, Tag >::type() );
+ return bindings::size( t, typename addressing_index_trans< tag::addressing_index<1>, Tag >::type() );
 }
 
 template< typename T, typename Tag >
 inline typename result_of::size_row_op< const T, Tag >::type
 size_column_op( const T& t, Tag ) {
- return bindings::size( t, typename index_trans< tag::index<2>, Tag >::type() );
+ return bindings::size( t, typename addressing_index_trans< tag::addressing_index<2>, Tag >::type() );
 }
 
 } // namespace bindings

Modified: sandbox/numeric_bindings/boost/numeric/bindings/stride.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/stride.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/stride.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -26,10 +26,10 @@
 namespace bindings {
 namespace detail {
 
-template< typename T, typename Index, typename Enable = void >
+template< typename T, typename AddressingIndex, typename Enable = void >
 struct stride_impl {
 
- typedef tag::stride_type< Index::value > key_type;
+ typedef tag::stride_type< AddressingIndex::value > key_type;
     typedef typename result_of_get< T, key_type >::type result_type;
 
     static result_type invoke( const T& t ) {
@@ -51,8 +51,8 @@
 // Iff size_i and stride_i are integral constants, results will be known at
 // compile time. Otherwise, the result_type will be std::ptrdiff_t.
 //
-template< typename T, typename Index >
-struct stride_impl< T, Index,
+template< typename T, typename AddressingIndex >
+struct stride_impl< T, AddressingIndex,
         typename boost::enable_if<
             mpl::equal_to< rank<T>, tag::scalar >
>::type > {
@@ -66,10 +66,10 @@
 };
 
 
-template< typename T, typename State, typename Index >
+template< typename T, typename State, typename AddressingIndex >
 struct fold_stride_size {
 
- typedef tag::index< Index::value > index_type;
+ typedef tag::addressing_index< AddressingIndex::value > index_type;
     typedef typename result_of::size< T, index_type >::type size_type;
     typedef typename stride_impl< T, index_type >::result_type stride_type;
 
@@ -96,20 +96,20 @@
 // and return that. Otherwise, runtime stuff is involved, so we'll
 // have to evaluate sum_i( size_i, stride_i ).
 //
-template< typename T, typename Result, int Index >
+template< typename T, typename Result, int AddressingIndex >
 struct apply_fold {
     static Result invoke( const T& t ) {
         return Result();
     }
 };
 
-template< typename T, int Index >
-struct apply_fold< T, std::ptrdiff_t, Index > {
+template< typename T, int AddressingIndex >
+struct apply_fold< T, std::ptrdiff_t, AddressingIndex > {
 
     static std::ptrdiff_t invoke( const T& t ) {
- return size( t, tag::index< Index >() ) *
- stride_impl< T, tag::index< Index > >::invoke( t ) +
- apply_fold< T, std::ptrdiff_t, Index-1 >::invoke( t );
+ return size( t, tag::addressing_index< AddressingIndex >() ) *
+ stride_impl< T, tag::addressing_index< AddressingIndex > >::invoke( t ) +
+ apply_fold< T, std::ptrdiff_t, AddressingIndex-1 >::invoke( t );
     }
 
 };
@@ -128,12 +128,12 @@
 // but not enough time right now
 
 
-template< typename T, typename Index >
-struct stride_impl< T, Index,
+template< typename T, typename AddressingIndex >
+struct stride_impl< T, AddressingIndex,
         typename boost::enable_if<
             mpl::and_<
                  mpl::greater< rank<T>, tag::scalar >,
- mpl::greater< Index, rank<T> >
+ mpl::greater< AddressingIndex, rank<T> >
>
>::type > {
 
@@ -159,7 +159,7 @@
 
 namespace result_of {
 
-template< typename T, typename Tag = tag::index<1> >
+template< typename T, typename Tag = tag::addressing_index<1> >
 struct stride {
     BOOST_STATIC_ASSERT( (is_tag<Tag>::value) );
     typedef typename detail::stride_impl< T, Tag >::result_type type;
@@ -186,22 +186,22 @@
 inline typename
 boost::enable_if<
     mpl::less< rank<T>, mpl::int_<2> >,
- typename result_of::stride< const T, tag::index<1> >::type
+ typename result_of::stride< const T, tag::addressing_index<1> >::type
>::type
 stride( const T& t ) {
- return detail::stride_impl<const T, tag::index<1> >::invoke( t );
+ return detail::stride_impl<const T, tag::addressing_index<1> >::invoke( t );
 }
 
 
 #define GENERATE_STRIDE_INDEX( z, which, unused ) \
-GENERATE_FUNCTIONS( stride, which, tag::index<which> )
+GENERATE_FUNCTIONS( stride, which, tag::addressing_index<which> )
 
 BOOST_PP_REPEAT_FROM_TO(1,3,GENERATE_STRIDE_INDEX,~)
 
-GENERATE_FUNCTIONS( stride, _row, tag::index<1> )
-GENERATE_FUNCTIONS( stride, _column, tag::index<2> )
-GENERATE_FUNCTIONS( stride, _major, typename index_major<T>::type )
-GENERATE_FUNCTIONS( stride, _minor, typename index_minor<T>::type )
+GENERATE_FUNCTIONS( stride, _row, tag::addressing_index<1> )
+GENERATE_FUNCTIONS( stride, _column, tag::addressing_index<2> )
+GENERATE_FUNCTIONS( stride, _major, typename addressing_index_major<T>::type )
+GENERATE_FUNCTIONS( stride, _minor, typename addressing_index_minor<T>::type )
 
 } // namespace bindings
 } // namespace numeric

Modified: sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp 2010-02-18 07:19:41 EST (Thu, 18 Feb 2010)
@@ -65,7 +65,7 @@
 ADD_INT_TEMPLATE_TAG( size_type )
 ADD_INT_TEMPLATE_TAG( stride_type )
 ADD_INT_TEMPLATE_TAG( bandwidth_type )
-ADD_INT_TEMPLATE_TAG( index )
+ADD_INT_TEMPLATE_TAG( addressing_index )
 
 // Supported data structures
 ADD_TAG( linear_array )


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