Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56269 - sandbox/numeric_bindings/boost/numeric/bindings/blas/level3
From: rutger_at_[hidden]
Date: 2009-09-17 07:56:17


Author: rutger
Date: 2009-09-17 07:56:16 EDT (Thu, 17 Sep 2009)
New Revision: 56269
URL: http://svn.boost.org/trac/boost/changeset/56269

Log:
user-defined traits for herk, syr2k, her2k, syrk

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp | 23 ++++++++++++-----------
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp | 19 ++++++++++---------
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp | 23 ++++++++++++-----------
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp | 23 ++++++++++++-----------
   4 files changed, 46 insertions(+), 42 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp 2009-09-17 07:56:16 EDT (Thu, 17 Sep 2009)
@@ -59,9 +59,9 @@
 
     // templated specialization
     template< typename MatrixA, typename MatrixB, typename MatrixC >
- static return_type invoke( const char trans, const integer_t k,
- const value_type alpha, const MatrixA& a, const MatrixB& b,
- const real_type beta, MatrixC& c ) {
+ static return_type invoke( const char trans, const value_type alpha,
+ const MatrixA& a, const MatrixB& b, const real_type beta,
+ MatrixC& c ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                 MatrixA >::value_type, typename traits::matrix_traits<
                 MatrixB >::value_type >::value) );
@@ -69,10 +69,12 @@
                 MatrixA >::value_type, typename traits::matrix_traits<
                 MatrixC >::value_type >::value) );
         detail::her2k( traits::matrix_uplo_tag(c), trans,
- traits::matrix_num_columns(c), k, alpha,
- traits::matrix_storage(a), traits::leading_dimension(a),
- traits::matrix_storage(b), traits::leading_dimension(b), beta,
- traits::matrix_storage(c), traits::leading_dimension(c) );
+ traits::matrix_num_columns(c),
+ (trans=='N'?traits::matrix_num_columns(a),
+ traits::matrix_num_rows(a)), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
     }
 };
 
@@ -80,13 +82,12 @@
 template< typename MatrixA, typename MatrixB, typename MatrixC >
 inline typename her2k_impl< typename traits::matrix_traits<
         MatrixA >::value_type >::return_type
-her2k( const char trans, const integer_t k,
- const typename traits::matrix_traits< MatrixA >::value_type alpha,
- const MatrixA& a, const MatrixB& b,
+her2k( const char trans, const typename traits::matrix_traits<
+ MatrixA >::value_type alpha, const MatrixA& a, const MatrixB& b,
         const typename traits::type_traits< typename traits::matrix_traits<
         MatrixA >::value_type >::real_type beta, MatrixC& c ) {
     typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
- her2k_impl< value_type >::invoke( trans, k, alpha, a, b, beta, c );
+ her2k_impl< value_type >::invoke( trans, alpha, a, b, beta, c );
 }
 
 }}}}} // namespace boost::numeric::bindings::blas::level3

Modified: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp 2009-09-17 07:56:16 EDT (Thu, 17 Sep 2009)
@@ -55,16 +55,17 @@
 
     // templated specialization
     template< typename MatrixA, typename MatrixC >
- static return_type invoke( const char trans, const integer_t k,
- const real_type alpha, const MatrixA& a, const real_type beta,
- MatrixC& c ) {
+ static return_type invoke( const char trans, const real_type alpha,
+ const MatrixA& a, const real_type beta, MatrixC& c ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                 MatrixA >::value_type, typename traits::matrix_traits<
                 MatrixC >::value_type >::value) );
         detail::herk( traits::matrix_uplo_tag(c), trans,
- traits::matrix_num_columns(c), k, alpha,
- traits::matrix_storage(a), traits::leading_dimension(a), beta,
- traits::matrix_storage(c), traits::leading_dimension(c) );
+ traits::matrix_num_columns(c),
+ (trans=='N'?traits::matrix_num_columns(a),
+ traits::matrix_num_rows(a)), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
     }
 };
 
@@ -72,13 +73,13 @@
 template< typename MatrixA, typename MatrixC >
 inline typename herk_impl< typename traits::matrix_traits<
         MatrixA >::value_type >::return_type
-herk( const char trans, const integer_t k,
- const typename traits::type_traits< typename traits::matrix_traits<
+herk( const char trans, const typename traits::type_traits<
+ typename traits::matrix_traits<
         MatrixA >::value_type >::real_type alpha, const MatrixA& a,
         const typename traits::type_traits< typename traits::matrix_traits<
         MatrixA >::value_type >::real_type beta, MatrixC& c ) {
     typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
- herk_impl< value_type >::invoke( trans, k, alpha, a, beta, c );
+ herk_impl< value_type >::invoke( trans, alpha, a, beta, c );
 }
 
 }}}}} // namespace boost::numeric::bindings::blas::level3

Modified: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp 2009-09-17 07:56:16 EDT (Thu, 17 Sep 2009)
@@ -75,9 +75,9 @@
 
     // templated specialization
     template< typename MatrixA, typename MatrixB, typename MatrixC >
- static return_type invoke( const char trans, const integer_t k,
- const value_type alpha, const MatrixA& a, const MatrixB& b,
- const value_type beta, MatrixC& c ) {
+ static return_type invoke( const char trans, const value_type alpha,
+ const MatrixA& a, const MatrixB& b, const value_type beta,
+ MatrixC& c ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                 MatrixA >::value_type, typename traits::matrix_traits<
                 MatrixB >::value_type >::value) );
@@ -85,10 +85,12 @@
                 MatrixA >::value_type, typename traits::matrix_traits<
                 MatrixC >::value_type >::value) );
         detail::syr2k( traits::matrix_uplo_tag(c), trans,
- traits::matrix_num_columns(c), k, alpha,
- traits::matrix_storage(a), traits::leading_dimension(a),
- traits::matrix_storage(b), traits::leading_dimension(b), beta,
- traits::matrix_storage(c), traits::leading_dimension(c) );
+ traits::matrix_num_columns(c),
+ (trans=='N'?traits::matrix_num_columns(a),
+ traits::matrix_num_rows(a)), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
     }
 };
 
@@ -96,13 +98,12 @@
 template< typename MatrixA, typename MatrixB, typename MatrixC >
 inline typename syr2k_impl< typename traits::matrix_traits<
         MatrixA >::value_type >::return_type
-syr2k( const char trans, const integer_t k,
- const typename traits::matrix_traits< MatrixA >::value_type alpha,
- const MatrixA& a, const MatrixB& b,
+syr2k( const char trans, const typename traits::matrix_traits<
+ MatrixA >::value_type alpha, const MatrixA& a, const MatrixB& b,
         const typename traits::matrix_traits< MatrixA >::value_type beta,
         MatrixC& c ) {
     typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
- syr2k_impl< value_type >::invoke( trans, k, alpha, a, b, beta, c );
+ syr2k_impl< value_type >::invoke( trans, alpha, a, b, beta, c );
 }
 
 }}}}} // namespace boost::numeric::bindings::blas::level3

Modified: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp 2009-09-17 07:56:16 EDT (Thu, 17 Sep 2009)
@@ -71,16 +71,17 @@
 
     // templated specialization
     template< typename MatrixA, typename MatrixC >
- static return_type invoke( const char trans, const integer_t k,
- const value_type alpha, const MatrixA& a, const value_type beta,
- MatrixC& c ) {
+ static return_type invoke( const char trans, const value_type alpha,
+ const MatrixA& a, const value_type beta, MatrixC& c ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                 MatrixA >::value_type, typename traits::matrix_traits<
                 MatrixC >::value_type >::value) );
         detail::syrk( traits::matrix_uplo_tag(c), trans,
- traits::matrix_num_columns(c), k, alpha,
- traits::matrix_storage(a), traits::leading_dimension(a), beta,
- traits::matrix_storage(c), traits::leading_dimension(c) );
+ traits::matrix_num_columns(c),
+ (trans=='N'?traits::matrix_num_columns(a),
+ traits::matrix_num_rows(a)), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
     }
 };
 
@@ -88,12 +89,12 @@
 template< typename MatrixA, typename MatrixC >
 inline typename syrk_impl< typename traits::matrix_traits<
         MatrixA >::value_type >::return_type
-syrk( const char trans, const integer_t k,
- const typename traits::matrix_traits< MatrixA >::value_type alpha,
- const MatrixA& a, const typename traits::matrix_traits<
- MatrixA >::value_type beta, MatrixC& c ) {
+syrk( const char trans, const typename traits::matrix_traits<
+ MatrixA >::value_type alpha, const MatrixA& a,
+ const typename traits::matrix_traits< MatrixA >::value_type beta,
+ MatrixC& c ) {
     typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
- syrk_impl< value_type >::invoke( trans, k, alpha, a, beta, c );
+ syrk_impl< value_type >::invoke( trans, alpha, a, beta, c );
 }
 
 }}}}} // namespace boost::numeric::bindings::blas::level3


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