|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63468 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/computational boost/numeric/bindings/lapack/driver libs/numeric/bindings/tools
From: thomas.klimpel_at_[hidden]
Date: 2010-07-02 14:51:23
Author: klimpel
Date: 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
New Revision: 63468
URL: http://svn.boost.org/trac/boost/changeset/63468
Log:
- Simplified formula detection of match_assert_ge (-> better and more predictable formula parsing)
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp | 8 ++++++--
sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp | 4 +++-
sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp | 5 ++++-
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp | 4 +++-
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp | 8 ++++++--
sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 4 ++--
6 files changed, 24 insertions(+), 9 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
@@ -152,7 +152,9 @@
BOOST_ASSERT( bindings::size_column(ab) >= 0 );
BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
bindings::stride_minor(ab) == 1 );
- BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(ab) >=
+ 2*bindings::bandwidth_lower(ab)+bindings::bandwidth_upper(ab)+
+ 1 );
BOOST_ASSERT( norm == '1' || norm == 'O' || norm == 'I' );
return detail::gbcon( norm, bindings::size_column(ab),
bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
@@ -245,7 +247,9 @@
BOOST_ASSERT( bindings::size_column(ab) >= 0 );
BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
bindings::stride_minor(ab) == 1 );
- BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(ab) >=
+ 2*bindings::bandwidth_lower(ab)+bindings::bandwidth_upper(ab)+
+ 1 );
BOOST_ASSERT( norm == '1' || norm == 'O' || norm == 'I' );
return detail::gbcon( norm, bindings::size_column(ab),
bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
@@ -129,7 +129,9 @@
BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
bindings::stride_minor(ab) == 1 );
BOOST_ASSERT( bindings::size_row(ab) >= 0 );
- BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(ab) >=
+ 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
bindings::bandwidth_lower(ab)) >= 0 );
return detail::gbtrf( bindings::size_row(ab),
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
@@ -148,7 +148,10 @@
bindings::stride_minor(ab) == 1 );
BOOST_ASSERT( bindings::size_minor(b) == 1 ||
bindings::stride_minor(b) == 1 );
- BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(ab) >=
+ 2*bindings::bandwidth_lower_op(ab, trans())+
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans()))+1 );
BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
bindings::size_column_op(ab, trans())) );
BOOST_ASSERT( (bindings::bandwidth_upper_op(ab, trans())-
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
@@ -139,7 +139,9 @@
bindings::stride_minor(ab) == 1 );
BOOST_ASSERT( bindings::size_minor(b) == 1 ||
bindings::stride_minor(b) == 1 );
- BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(ab) >=
+ 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
bindings::size_column(ab)) );
BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
@@ -225,7 +225,9 @@
BOOST_ASSERT( bindings::stride_major(ab) >=
bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
bindings::bandwidth_lower(ab))+1 );
- BOOST_ASSERT( bindings::stride_major(afb) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(afb) >=
+ 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
bindings::size_column(ab)) );
BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
@@ -388,7 +390,9 @@
BOOST_ASSERT( bindings::stride_major(ab) >=
bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
bindings::bandwidth_lower(ab))+1 );
- BOOST_ASSERT( bindings::stride_major(afb) >= 2 );
+ BOOST_ASSERT( bindings::stride_major(afb) >=
+ 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
bindings::size_column(ab)) );
BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py 2010-07-01 03:00:17 EDT (Thu, 01 Jul 2010)
@@ -788,13 +788,13 @@
#
def match_assert_ge( argument_map, text_field ):
#print "Match assert GE..."
- match_it = re.compile( ' +[A-Z]+[ ]{0,3}(>=|must be at least)[ ]{0,3}([0-9]|(min|max|MIN|MAX|[0-9A-Z]| ?[\(\)\,\+\*\-] ?)+)' ).findall( text_field )
+ match_it = re.compile( ' +[A-Z]+[ ]{0,3}(>=|must be at least)[ ]{0,3}((min|max|MIN|MAX|[0-9A-Z]| ?[\(\)\,\+\*\-] ?)+)' ).findall( text_field )
if len( match_it ) == 1 or \
(len( match_it ) == 2 and re.compile( 'For (optimum|optimal|best) (performance|efficiency)' ).search( text_field ) != None):
print "Match assert GE:", match_it
#print match_it
#if len( match_it[ 0 ][ 2 ] ) > 0:
- return decompose_formula( match_it[ 0 ][ 1 ].replace( ' ', '' ) )
+ return decompose_formula( match_it[ 0 ][ 1 ].replace( ' ', '' ).rstrip(',') )
else:
print "nr of matches: ", len( match_it )
return None
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