Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57938 - in sandbox/numeric_bindings/boost/numeric/bindings: . tnt
From: rutger_at_[hidden]
Date: 2009-11-26 03:21:22


Author: rutger
Date: 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
New Revision: 57938
URL: http://svn.boost.org/trac/boost/changeset/57938

Log:
updated TNT container bindings

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/tnt.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/array1d.hpp
      - copied, changed from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array1d.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/array_2d.hpp
      - copied, changed from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array2d.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array1d.hpp
      - copied, changed from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array1d.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array2d.hpp
      - copied, changed from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array2d.hpp
Removed:
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array1d.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array2d.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array1d.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array2d.hpp
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/array1d.hpp | 4 +++-
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/array_2d.hpp | 10 +++++++++-
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array1d.hpp | 4 +++-
   sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array2d.hpp | 11 ++++++++++-
   4 files changed, 25 insertions(+), 4 deletions(-)

Added: sandbox/numeric_bindings/boost/numeric/bindings/tnt.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tnt.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
@@ -0,0 +1,17 @@
+//
+// 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_STD_HPP
+#define BOOST_NUMERIC_BINDINGS_STD_HPP
+
+#include <boost/numeric/bindings/tnt/array1d.hpp>
+#include <boost/numeric/bindings/tnt/array2d.hpp>
+#include <boost/numeric/bindings/tnt/fortran_array2d.hpp>
+#include <boost/numeric/bindings/tnt/fortran_array2d.hpp>
+
+#endif

Copied: sandbox/numeric_bindings/boost/numeric/bindings/tnt/array1d.hpp (from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array1d.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array1d.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tnt/array1d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
@@ -24,7 +24,9 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::data_structure, tag::linear_array >
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::data_structure, tag::linear_array >,
+ mpl::pair< tag::stride_type<1>, tag::contiguous >
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {

Copied: sandbox/numeric_bindings/boost/numeric/bindings/tnt/array_2d.hpp (from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array2d.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array2d.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tnt/array_2d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
@@ -24,8 +24,12 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
         mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::data_order, tag::row_major >
+ mpl::pair< tag::data_order, tag::row_major >,
+ mpl::pair< tag::stride_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::stride_type<2>, tag::contiguous >
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {
@@ -40,6 +44,10 @@
         return &t[0];
     }
 
+ static std::ptrdiff_t stride1( Id const& t ) {
+ return t.dim2();
+ }
+
 };
 
 } // namespace detail

Copied: sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array1d.hpp (from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array1d.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array1d.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array1d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
@@ -24,7 +24,9 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::data_structure, tag::linear_array >
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::data_structure, tag::linear_array >,
+ mpl::pair< tag::stride_type<1>, tag::contiguous >
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {

Copied: sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array2d.hpp (from r57927, /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array2d.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array2d.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tnt/fortran_array2d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
@@ -24,8 +24,13 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
         mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::data_order, tag::column_major >
+ mpl::pair< tag::data_order, tag::column_major >,
+ mpl::pair< tag::stride_type<1>, tag::contiguous >,
+ mpl::pair< tag::stride_type<2>, std::ptrdiff_t >
+
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {
@@ -40,6 +45,10 @@
         return &t(1,1);
     }
 
+ static std::ptrdiff_t stride2( Id const& t ) {
+ return t.dim1();
+ }
+
 };
 
 } // namespace detail

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array1d.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array1d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
+++ (empty file)
@@ -1,45 +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_TNT_ARRAY1D_HPP
-#define BOOST_NUMERIC_BINDINGS_TNT_ARRAY1D_HPP
-
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <tnt_array1d.h>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, typename Id, typename Enable >
-struct adaptor< TNT::Array1D< T >, Id, Enable > {
-
- typedef typename copy_const< Id, T >::type value_type;
- typedef mpl::map<
- mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::data_structure, tag::linear_array >
- > property_map;
-
- static std::ptrdiff_t size1( Id const& t ) {
- return t.dim();
- }
-
- static value_type* data( Id& t ) {
- return &t[0];
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array2d.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_array2d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
+++ (empty file)
@@ -1,50 +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_TNT_ARRAY2D_HPP
-#define BOOST_NUMERIC_BINDINGS_TNT_ARRAY2D_HPP
-
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <tnt_array2d.h>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, typename Id, typename Enable >
-struct adaptor< TNT::Array2D< T >, Id, Enable > {
-
- typedef typename copy_const< Id, T >::type value_type;
- typedef mpl::map<
- mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::matrix >,
- mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::data_order, tag::row_major >
- > property_map;
-
- static std::ptrdiff_t size1( Id const& t ) {
- return t.dim1();
- }
-
- static std::ptrdiff_t size2( Id const& t ) {
- return t.dim2();
- }
-
- static value_type* data( Id& t ) {
- return &t[0];
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array1d.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array1d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
+++ (empty file)
@@ -1,45 +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_TNT_FORTRAN_ARRAY1D_HPP
-#define BOOST_NUMERIC_BINDINGS_TNT_FORTRAN_ARRAY1D_HPP
-
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <tnt_fortran_array1d.h>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, typename Id, typename Enable >
-struct adaptor< TNT::Fortran_Array1D< T >, Id, Enable > {
-
- typedef typename copy_const< Id, T >::type value_type;
- typedef mpl::map<
- mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::data_structure, tag::linear_array >
- > property_map;
-
- static std::ptrdiff_t size1( Id const& t ) {
- return t.dim();
- }
-
- static value_type* data( Id& t ) {
- return &t(1);
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array2d.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tnt/tnt_fortran_array2d.hpp 2009-11-26 03:21:21 EST (Thu, 26 Nov 2009)
+++ (empty file)
@@ -1,50 +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_TNT_FORTRAN_ARRAY2D_HPP
-#define BOOST_NUMERIC_BINDINGS_TNT_FORTRAN_ARRAY2D_HPP
-
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <tnt_fortran_array2d.h>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, typename Id, typename Enable >
-struct adaptor< TNT::Fortran_Array2D< T >, Id, Enable > {
-
- typedef typename copy_const< Id, T >::type value_type;
- typedef mpl::map<
- mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::matrix >,
- mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::data_order, tag::column_major >
- > property_map;
-
- static std::ptrdiff_t size1( Id const& t ) {
- return t.dim1();
- }
-
- static std::ptrdiff_t size2( Id const& t ) {
- return t.dim2();
- }
-
- static value_type* data( Id& t ) {
- return &t(1,1);
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif


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