|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63831 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/computational libs/numeric/bindings/tools/templates/computational
From: thomas.klimpel_at_[hidden]
Date: 2010-07-10 18:40:48
Author: klimpel
Date: 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
New Revision: 63831
URL: http://svn.boost.org/trac/boost/changeset/63831
Log:
improved consistency between templates for orthogonal and unitary matrix routines
Added:
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp (contents, props changed)
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/unm.hpp
- copied, changed from r63830, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp
Removed:
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp | 7 +++----
sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp | 3 ++-
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp | 7 +++----
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/unm.hpp | 32 --------------------------------
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp | 1 +
5 files changed, 9 insertions(+), 41 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
@@ -17,6 +17,7 @@
#include <boost/assert.hpp>
#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/detail/array.hpp>
+#include <boost/numeric/bindings/detail/if_left.hpp>
#include <boost/numeric/bindings/is_column_major.hpp>
#include <boost/numeric/bindings/is_mutable.hpp>
#include <boost/numeric/bindings/lapack/workspace.hpp>
@@ -168,10 +169,8 @@
template< typename Side >
static std::ptrdiff_t min_size_work( const Side side,
const std::ptrdiff_t m, const std::ptrdiff_t n ) {
- if ( side == 'L' )
- return n;
- else
- return m;
+ return std::max< std::ptrdiff_t >( 1, bindings::detail::if_left( side,
+ n, m ) );
}
};
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
@@ -171,7 +171,8 @@
template< typename Side >
static std::ptrdiff_t min_size_work( const Side side,
const std::ptrdiff_t m, const std::ptrdiff_t n ) {
- $MIN_SIZE_IMPLEMENTATION
+ return std::max< std::ptrdiff_t >( 1, bindings::detail::if_left( side,
+ n, m ) );
}
};
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
@@ -1,8 +1,7 @@
$TEMPLATE[opmtr.all.min_size_work.args]
SIDE,M,N
+$TEMPLATE[opmtr.includes]
+#include <boost/numeric/bindings/detail/if_left.hpp>
$TEMPLATE[opmtr.all.min_size_work]
-if ( side == 'L' )
- return n;
-else
- return m;
+return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
$TEMPLATE[end]
Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
+++ (empty file)
@@ -1,83 +0,0 @@
-$TEMPLATE[ungbr.all.min_size_work.args]
-M,N
-$TEMPLATE[ungbr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n ) );
-$TEMPLATE[ungql.all.min_size_work.args]
-N
-$TEMPLATE[ungql.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, n );
-$TEMPLATE[ungqr.all.M.trait_of]
-A
-$TEMPLATE[ungqr.all.N.trait_of]
-A
-$TEMPLATE[ungqr.all.K.trait]
-size,TAU
-$TEMPLATE[ungqr.all.min_size_work.args]
-N
-$TEMPLATE[ungqr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, n );
-$TEMPLATE[unglq.all.min_size_work.args]
-M
-$TEMPLATE[unglq.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, m );
-$TEMPLATE[ungrq.all.min_size_work.args]
-M
-$TEMPLATE[ungrq.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, m );
-$TEMPLATE[ungtr.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[ungtr.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[ungtr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmbr.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmbr.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmbr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmhr.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmhr.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmhr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmlq.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmlq.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmlq.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmqr.all.K.trait]
-size,TAU
-$TEMPLATE[unmqr.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmqr.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmqr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmrq.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmrq.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmrq.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmrz.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmrz.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmrz.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmql.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmql.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmql.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[unmtr.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[unmtr.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[unmtr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
-$TEMPLATE[end]
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
@@ -0,0 +1,33 @@
+$TEMPLATE[ungbr.all.min_size_work.args]
+M,N
+$TEMPLATE[ungbr.all.min_size_work]
+return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n ) );
+$TEMPLATE[ungql.all.min_size_work.args]
+N
+$TEMPLATE[ungql.all.min_size_work]
+return std::max< $INTEGER_TYPE >( 1, n );
+$TEMPLATE[ungqr.all.M.trait_of]
+A
+$TEMPLATE[ungqr.all.N.trait_of]
+A
+$TEMPLATE[ungqr.all.K.trait]
+size,TAU
+$TEMPLATE[ungqr.all.min_size_work.args]
+N
+$TEMPLATE[ungqr.all.min_size_work]
+return std::max< $INTEGER_TYPE >( 1, n );
+$TEMPLATE[unglq.all.min_size_work.args]
+M
+$TEMPLATE[unglq.all.min_size_work]
+return std::max< $INTEGER_TYPE >( 1, m );
+$TEMPLATE[ungrq.all.min_size_work.args]
+M
+$TEMPLATE[ungrq.all.min_size_work]
+return std::max< $INTEGER_TYPE >( 1, m );
+$TEMPLATE[ungtr.all.min_size_work.args]
+SIDE,M,N
+$TEMPLATE[ungtr.includes]
+#include <boost/numeric/bindings/detail/if_left.hpp>
+$TEMPLATE[ungtr.all.min_size_work]
+return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
+$TEMPLATE[end]
Copied: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/unm.hpp (from r63830, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp)
==============================================================================
--- /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/unm.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
@@ -1,35 +1,3 @@
-$TEMPLATE[ungbr.all.min_size_work.args]
-M,N
-$TEMPLATE[ungbr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n ) );
-$TEMPLATE[ungql.all.min_size_work.args]
-N
-$TEMPLATE[ungql.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, n );
-$TEMPLATE[ungqr.all.M.trait_of]
-A
-$TEMPLATE[ungqr.all.N.trait_of]
-A
-$TEMPLATE[ungqr.all.K.trait]
-size,TAU
-$TEMPLATE[ungqr.all.min_size_work.args]
-N
-$TEMPLATE[ungqr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, n );
-$TEMPLATE[unglq.all.min_size_work.args]
-M
-$TEMPLATE[unglq.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, m );
-$TEMPLATE[ungrq.all.min_size_work.args]
-M
-$TEMPLATE[ungrq.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, m );
-$TEMPLATE[ungtr.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[ungtr.includes]
-#include <boost/numeric/bindings/detail/if_left.hpp>
-$TEMPLATE[ungtr.all.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
$TEMPLATE[unmbr.all.min_size_work.args]
SIDE,M,N
$TEMPLATE[unmbr.includes]
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp 2010-07-10 18:40:46 EDT (Sat, 10 Jul 2010)
@@ -4,3 +4,4 @@
#include <boost/numeric/bindings/detail/if_left.hpp>
$TEMPLATE[upmtr.all.min_size_work]
return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
+$TEMPLATE[end]
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