Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57956 - in sandbox/numeric_bindings/boost/numeric/bindings: . detail ublas/detail
From: rutger_at_[hidden]
Date: 2009-11-26 16:04:50


Author: rutger
Date: 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
New Revision: 57956
URL: http://svn.boost.org/trac/boost/changeset/57956

Log:
moved tag namespace out of detail namespace into bindings namespace

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/detail/void_ptr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/noop.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp
      - copied, changed from r57947, /sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp
Removed:
   sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/detail/adaptor.hpp | 4 ++--
   sandbox/numeric_bindings/boost/numeric/bindings/detail/if_row_major.hpp | 2 +-
   sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp | 6 +++---
   sandbox/numeric_bindings/boost/numeric/bindings/size.hpp | 4 ++--
   sandbox/numeric_bindings/boost/numeric/bindings/stride.hpp | 4 ++--
   sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp | 9 +++------
   sandbox/numeric_bindings/boost/numeric/bindings/tensor_rank.hpp | 2 +-
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/convert_to.hpp | 2 +-
   sandbox/numeric_bindings/boost/numeric/bindings/value_type.hpp | 2 +-
   9 files changed, 16 insertions(+), 19 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/detail/adaptor.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/detail/adaptor.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/detail/adaptor.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -10,9 +10,9 @@
 #define BOOST_NUMERIC_BINDINGS_DETAIL_ADAPTOR_HPP
 
 #include <boost/utility/enable_if.hpp>
-#include <boost/numeric/bindings/is_numeric.hpp>
-#include <boost/numeric/bindings/detail/tag.hpp>
 #include <boost/numeric/bindings/detail/copy_const.hpp>
+#include <boost/numeric/bindings/is_numeric.hpp>
+#include <boost/numeric/bindings/tag.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/mpl/map.hpp>
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/detail/if_row_major.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/detail/if_row_major.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/detail/if_row_major.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -9,7 +9,7 @@
 #ifndef BOOST_NUMERIC_BINDINGS_DETAIL_IF_ROW_MAJOR_HPP
 #define BOOST_NUMERIC_BINDINGS_DETAIL_IF_ROW_MAJOR_HPP
 
-#include <boost/numeric/bindings/detail/tag.hpp>
+#include <boost/numeric/bindings/tag.hpp>
 
 namespace boost {
 namespace numeric {

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
+++ (empty file)
@@ -1,71 +0,0 @@
-//
-// Copyright (c) 2009 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_DETAIL_TAG_HPP
-#define BOOST_NUMERIC_BINDINGS_DETAIL_TAG_HPP
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-namespace tag {
-
-// key: entity
-struct value_type {};
-struct entity {};
-
-struct matrix_type {};
-struct matrix_side {};
-
-struct data_structure {};
-struct data_order {};
-struct data_side {};
-
-template< int Rank >
-struct tensor: mpl::int_< Rank > {};
-
-struct scalar: tensor<0> {};
-struct vector: tensor<1> {};
-struct matrix: tensor<2> {};
-
-template< int Dimension >
-struct size_type: mpl::int_< Dimension > {};
-
-template< int Dimension >
-struct stride_type: mpl::int_< Dimension > {};
-
-struct contiguous: mpl::int_<1> {};
-
-// Supported data structures
-struct linear_array {};
-struct triangular_array {};
-struct yale_sparse {};
-
-struct structure {};
-struct general {};
-struct triangular {};
-struct symmetric {};
-
-struct num_strides {};
-
-struct row_major {};
-struct column_major {};
-
-struct upper {};
-struct lower {};
-struct unit_upper {};
-struct unit_lower {};
-
-} // tag
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/detail/void_ptr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/detail/void_ptr.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -0,0 +1,32 @@
+//
+// Copyright (c) 2009 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_DETAIL_VOID_PTR_HPP
+#define BOOST_NUMERIC_BINDINGS_DETAIL_VOID_PTR_HPP
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace detail {
+
+template< typename T >
+inline void* void_ptr( T* p) {
+ return static_cast< void*>( p );
+}
+
+template< typename T >
+inline const void* void_ptr( const T* p ) {
+ return static_cast< const void* >( p );
+}
+
+} // namespace detail
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif

Modified: sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -9,8 +9,8 @@
 #ifndef BOOST_NUMERIC_BINDINGS_HAS_LINEAR_ARRAY_HPP
 #define BOOST_NUMERIC_BINDINGS_HAS_LINEAR_ARRAY_HPP
 
-#include <boost/type_traits/is_same.hpp>
-#include <boost/numeric/bindings/detail/adaptor.hpp>
+#include <boost/numeric/bindings/detail/property_map.hpp>
+#include <boost/numeric/bindings/tag.hpp>
 
 namespace boost {
 namespace numeric {
@@ -18,7 +18,7 @@
 
 template< typename T >
 struct has_linear_array:
- detail::is_same_at< T, detail::tag::data_structure, detail::tag::linear_array > {};
+ detail::is_same_at< T, tag::data_structure, tag::linear_array > {};
 
 
 } // namespace bindings

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
+++ (empty file)
@@ -1,70 +0,0 @@
-//
-// Copyright (c) 2009 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_IDENTITY_HPP
-#define BOOST_NUMERIC_BINDINGS_IDENTITY_HPP
-
-#include <boost/numeric/bindings/detail/adaptable_type.hpp>
-#include <boost/numeric/bindings/size.hpp>
-#include <boost/numeric/bindings/stride.hpp>
-#include <boost/ref.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T >
-struct identity_wrapper:
- adaptable_type< identity_wrapper<T> >,
- reference_wrapper<T> {
- identity_wrapper( T& t ): reference_wrapper<T>( t ) {}
-};
-
-template< typename T, typename Id, typename Enable >
-struct adaptor< identity_wrapper<T>, Id, Enable > {
-
- typedef adaptor< typename boost::remove_const<T>::type, T > underlying_adaptor;
- typedef typename underlying_adaptor::property_map property_map;
-
- static typename result_of::size<T,1>::type size1( Id const& id ) {
- return size<1>( id.get() );
- }
-
- static typename mpl::at< property_map, tag::value_type >::type* data( Id& id ) {
- return underlying_adaptor::data( id.get() );
- }
-
-};
-
-} // namespace detail
-
-namespace result_of {
-
-template< typename T >
-struct identity {
- typedef detail::identity_wrapper<T> type;
-};
-
-} // namespace result_of
-
-template< typename T >
-detail::identity_wrapper<T> identity( T& underlying ) {
- return detail::identity_wrapper<T>( underlying );
-}
-
-template< typename T >
-detail::identity_wrapper<T const> identity( T const& underlying ) {
- return detail::identity_wrapper<T const>( underlying );
-}
-
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/noop.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/noop.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2009 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_NOOP_HPP
+#define BOOST_NUMERIC_BINDINGS_NOOP_HPP
+
+#include <boost/numeric/bindings/detail/adaptable_type.hpp>
+#include <boost/numeric/bindings/size.hpp>
+#include <boost/numeric/bindings/stride.hpp>
+#include <boost/ref.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace detail {
+
+template< typename T >
+struct noop_wrapper:
+ adaptable_type< noop_wrapper<T> >,
+ reference_wrapper<T> {
+ noop_wrapper( T& t ): reference_wrapper<T>( t ) {}
+};
+
+template< typename T, typename Id, typename Enable >
+struct adaptor< noop_wrapper<T>, Id, Enable > {
+
+ typedef adaptor< typename boost::remove_const<T>::type, T > underlying_adaptor;
+ typedef typename underlying_adaptor::property_map property_map;
+
+ static typename result_of::size<T,1>::type size1( Id const& id ) {
+ return size<1>( id.get() );
+ }
+
+ static typename mpl::at< property_map, tag::value_type >::type* data( Id& id ) {
+ return underlying_adaptor::data( id.get() );
+ }
+
+};
+
+} // namespace detail
+
+namespace result_of {
+
+template< typename T >
+struct noop {
+ typedef detail::noop_wrapper<T> type;
+};
+
+} // namespace result_of
+
+template< typename T >
+detail::noop_wrapper<T> noop( T& underlying ) {
+ return detail::noop_wrapper<T>( underlying );
+}
+
+template< typename T >
+detail::noop_wrapper<T const> noop( T const& underlying ) {
+ return detail::noop_wrapper<T const>( underlying );
+}
+
+} // 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 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -72,14 +72,14 @@
 
 template< typename T, int Dimension >
 struct size {
- typedef typename detail::size_impl< T, detail::tag::size_type<Dimension> >::result_type type;
+ typedef typename detail::size_impl< T, tag::size_type<Dimension> >::result_type type;
 };
 
 } // namespace result_of
 
 template< int Dimension, typename T >
 inline typename result_of::size< T const, Dimension >::type size( T const& t ) {
- return detail::size_impl< T const, detail::tag::size_type<Dimension> >::size( t );
+ return detail::size_impl< T const, tag::size_type<Dimension> >::size( t );
 }
 
 template< typename T >

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 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -69,14 +69,14 @@
 
 template< typename T, int Dimension >
 struct stride {
- typedef typename detail::stride_impl< T, detail::tag::stride_type<Dimension> >::result_type type;
+ typedef typename detail::stride_impl< T, tag::stride_type<Dimension> >::result_type type;
 };
 
 } // namespace result_of
 
 template< int Dimension, typename T >
 inline typename result_of::stride< T const, Dimension >::type stride( T const& t ) {
- return detail::stride_impl< T const, detail::tag::stride_type<Dimension> >::stride( t );
+ return detail::stride_impl< T const, tag::stride_type<Dimension> >::stride( t );
 }
 
 template< typename T >

Copied: sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp (from r57947, /sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -6,13 +6,12 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
-#ifndef BOOST_NUMERIC_BINDINGS_DETAIL_TAG_HPP
-#define BOOST_NUMERIC_BINDINGS_DETAIL_TAG_HPP
+#ifndef BOOST_NUMERIC_BINDINGS_TAG_HPP
+#define BOOST_NUMERIC_BINDINGS_TAG_HPP
 
 namespace boost {
 namespace numeric {
 namespace bindings {
-namespace detail {
 namespace tag {
 
 // key: entity
@@ -61,9 +60,7 @@
 struct unit_upper {};
 struct unit_lower {};
 
-} // tag
-
-} // namespace detail
+} // namespace tag
 } // namespace bindings
 } // namespace numeric
 } // namespace boost

Modified: sandbox/numeric_bindings/boost/numeric/bindings/tensor_rank.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tensor_rank.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tensor_rank.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -16,7 +16,7 @@
 namespace bindings {
 
 template< typename T >
-struct tensor_rank: mpl::int_< detail::property_at< T, detail::tag::entity >::type::value > {};
+struct tensor_rank: mpl::int_< detail::property_at< T, tag::entity >::type::value > {};
 
 } // namespace bindings
 } // namespace numeric

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/convert_to.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/convert_to.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/convert_to.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -10,7 +10,7 @@
 #define BOOST_NUMERIC_BINDINGS_UBLAS_DETAIL_CONVERT_TO_HPP
 
 #include <boost/numeric/bindings/detail/convert_to.hpp>
-#include <boost/numeric/bindings/detail/tag.hpp>
+#include <boost/numeric/bindings/tag.hpp>
 #include <boost/numeric/ublas/fwd.hpp>
 
 namespace boost {

Modified: sandbox/numeric_bindings/boost/numeric/bindings/value_type.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/value_type.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/value_type.hpp 2009-11-26 16:04:48 EST (Thu, 26 Nov 2009)
@@ -17,7 +17,7 @@
 
 template< typename T >
 struct value_type {
- typedef typename detail::property_at< T, detail::tag::value_type >::type type;
+ typedef typename detail::property_at< T, tag::value_type >::type type;
 };
 
 } // namespace bindings


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