Example #1
0
 static std::ptrdiff_t invoke( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
         detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef typename result_of::uplo_tag< MatrixA >::type uplo;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixA >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixB >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIPIV >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_work());
     BOOST_ASSERT( bindings::size_column(a) >= 0 );
     BOOST_ASSERT( bindings::size_column(b) >= 0 );
     BOOST_ASSERT( bindings::size_minor(a) == 1 ||
             bindings::stride_minor(a) == 1 );
     BOOST_ASSERT( bindings::size_minor(b) == 1 ||
             bindings::stride_minor(b) == 1 );
     BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
             bindings::size_column(a)) );
     BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
             bindings::size_column(a)) );
     return detail::hesv( uplo(), bindings::size_column(a),
             bindings::size_column(b), bindings::begin_value(a),
             bindings::stride_major(a), bindings::begin_value(ipiv),
             bindings::begin_value(b), bindings::stride_major(b),
             bindings::begin_value(work.select(value_type())),
             bindings::size(work.select(value_type())) );
 }
Example #2
0
 static std::ptrdiff_t invoke( const fortran_int_t itype,
         const char jobz, MatrixAP& ap, MatrixBP& bp, VectorW& w,
         MatrixZ& z, detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixZ >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixAP >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixBP >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixAP >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorW >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixAP >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixZ >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixAP >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixBP >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorW >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixZ >::value) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( bindings::size_column(ap) ));
     BOOST_ASSERT( bindings::size_column(ap) >= 0 );
     BOOST_ASSERT( bindings::size_minor(z) == 1 ||
             bindings::stride_minor(z) == 1 );
     BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
     return detail::spgv( itype, jobz, uplo(), bindings::size_column(ap),
             bindings::begin_value(ap), bindings::begin_value(bp),
             bindings::begin_value(w), bindings::begin_value(z),
             bindings::stride_major(z),
             bindings::begin_value(work.select(real_type())) );
 }
Example #3
0
 static std::ptrdiff_t invoke( const Side side, const char uplo,
         const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
         detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef tag::column_major order;
     typedef typename result_of::trans_tag< VectorAP, order >::type trans;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixC >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorAP >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorTAU >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorAP >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixC >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( side, bindings::size_row(c),
             bindings::size_column(c) ));
     BOOST_ASSERT( bindings::size_column(c) >= 0 );
     BOOST_ASSERT( bindings::size_minor(c) == 1 ||
             bindings::stride_minor(c) == 1 );
     BOOST_ASSERT( bindings::size_row(c) >= 0 );
     BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
             bindings::size_row(c)) );
     return detail::opmtr( side, uplo, trans(), bindings::size_row(c),
             bindings::size_column(c), bindings::begin_value(ap),
             bindings::begin_value(tau), bindings::begin_value(c),
             bindings::stride_major(c),
             bindings::begin_value(work.select(real_type())) );
 }
Example #4
0
 static std::ptrdiff_t invoke( MatrixA& a, VectorTAU& tau,
         detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixA >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorTAU >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorTAU >::value) );
     BOOST_ASSERT( bindings::size(tau) >= std::min<
             std::ptrdiff_t >(bindings::size_row(a),
             bindings::size_column(a)) );
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_work( bindings::size_column(a) ));
     BOOST_ASSERT( bindings::size_column(a) >= 0 );
     BOOST_ASSERT( bindings::size_minor(a) == 1 ||
             bindings::stride_minor(a) == 1 );
     BOOST_ASSERT( bindings::size_row(a) >= 0 );
     BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
             bindings::size_row(a)) );
     return detail::geqrf( bindings::size_row(a), bindings::size_column(a),
             bindings::begin_value(a), bindings::stride_major(a),
             bindings::begin_value(tau),
             bindings::begin_value(work.select(value_type())),
             bindings::size(work.select(value_type())) );
 }
Example #5
0
 static void invoke( char const vect, char const side, char const trans,
         integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
         integer_t& info, detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorTAU >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::matrix_traits<
             MatrixC >::value_type >::value) );
     BOOST_ASSERT( vect == 'Q' || vect == 'P' );
     BOOST_ASSERT( side == 'L' || side == 'R' );
     BOOST_ASSERT( trans == 'N' || trans == 'T' );
     BOOST_ASSERT( traits::matrix_num_rows(c) >= 0 );
     BOOST_ASSERT( traits::matrix_num_columns(c) >= 0 );
     BOOST_ASSERT( k >= 0 );
     BOOST_ASSERT( traits::vector_size(tau) >= std::min(?NQ,k) );
     BOOST_ASSERT( traits::leading_dimension(c) >= std::max(1,
             traits::matrix_num_rows(c)) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( side, traits::matrix_num_rows(c),
             traits::matrix_num_columns(c) ));
     detail::ormbr( vect, side, trans, traits::matrix_num_rows(c),
             traits::matrix_num_columns(c), k, traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(tau),
             traits::matrix_storage(c), traits::leading_dimension(c),
             traits::vector_storage(work.select(real_type())),
             traits::vector_size(work.select(real_type())), info );
 }
Example #6
0
 static void invoke( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
         integer_t& info, detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::vector_traits<
             VectorD >::value_type, typename traits::vector_traits<
             VectorE >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorTAU >::value_type >::value) );
     BOOST_ASSERT( traits::matrix_uplo_tag(a) == 'U' ||
             traits::matrix_uplo_tag(a) == 'L' );
     BOOST_ASSERT( traits::matrix_num_columns(a) >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= std::max(1,
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(d) >=
             traits::matrix_num_columns(a) );
     BOOST_ASSERT( traits::vector_size(tau) >=
             traits::matrix_num_columns(a)-1 );
     BOOST_ASSERT( traits::vector_size(work.select(value_type())) >=
             min_size_work(  ));
     detail::hetrd( traits::matrix_uplo_tag(a),
             traits::matrix_num_columns(a), traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(d),
             traits::vector_storage(e), traits::vector_storage(tau),
             traits::vector_storage(work.select(value_type())),
             traits::vector_size(work.select(value_type())), info );
 }
Example #7
0
 static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
         MatrixZ& z, detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixZ >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorD >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorE >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorD >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixZ >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorD >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorE >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixZ >::value) );
     BOOST_ASSERT( bindings::size(d) >= bindings::size(d) );
     BOOST_ASSERT( bindings::size(d) >= 0 );
     BOOST_ASSERT( bindings::size(e) >= bindings::size(d)-1 );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( bindings::size(d) ));
     BOOST_ASSERT( bindings::size_minor(z) == 1 ||
             bindings::stride_minor(z) == 1 );
     BOOST_ASSERT( compz == 'N' || compz == 'V' || compz == 'I' );
     return detail::pteqr( compz, bindings::size(d),
             bindings::begin_value(d), bindings::begin_value(e),
             bindings::begin_value(z), bindings::stride_major(z),
             bindings::begin_value(work.select(real_type())) );
 }
Example #8
0
 static void invoke( char const job, integer_t const n, MatrixA& a,
         MatrixB& b, integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
         VectorRSCALE& rscale, integer_t& info, detail::workspace1<
         WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::matrix_traits<
             MatrixB >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorLSCALE >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorRSCALE >::value_type >::value) );
     BOOST_ASSERT( job == 'N' || job == 'P' || job == 'S' || job == 'B' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= std::max(1,n) );
     BOOST_ASSERT( traits::leading_dimension(b) >= std::max(1,n) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( $CALL_MIN_SIZE ));
     detail::ggbal( job, n, traits::matrix_storage(a),
             traits::leading_dimension(a), traits::matrix_storage(b),
             traits::leading_dimension(b), ilo, ihi,
             traits::vector_storage(lscale),
             traits::vector_storage(rscale),
             traits::vector_storage(work.select(real_type())), info );
 }
Example #9
0
 static std::ptrdiff_t invoke( const char norm, const MatrixAP& ap,
         detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( norm, bindings::size_column(ap) ));
     BOOST_ASSERT( bindings::size_column(ap) >= 0 );
     return detail::lanhp( norm, uplo(), bindings::size_column(ap),
             bindings::begin_value(ap),
             bindings::begin_value(work.select(real_type())) );
 }
Example #10
0
 static std::ptrdiff_t invoke( const fortran_int_t n, VectorX& x,
         real_type& est, fortran_int_t& kase, detail::workspace1<
         V > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorX >::value) );
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_v( n ));
     BOOST_ASSERT( n >= 1 );
     return detail::lacon( n,
             bindings::begin_value(work.select(value_type())),
             bindings::begin_value(x), est, kase );
 }
Example #11
0
 static std::ptrdiff_t invoke( const MatrixAP& ap, const VectorIPIV& ipiv,
         const real_type anorm, real_type& rcond, detail::workspace1<
         WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
     BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column(ap) );
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_work( bindings::size_column(ap) ));
     BOOST_ASSERT( bindings::size_column(ap) >= 0 );
     return detail::hpcon( uplo(), bindings::size_column(ap),
             bindings::begin_value(ap), bindings::begin_value(ipiv), anorm,
             rcond, bindings::begin_value(work.select(value_type())) );
 }
Example #12
0
 static std::ptrdiff_t invoke( const VectorD& d, const VectorE& e,
         const real_type anorm, real_type& rcond, detail::workspace1<
         RWORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_ASSERT( bindings::size(d) >= bindings::size(d) );
     BOOST_ASSERT( bindings::size(d) >= 0 );
     BOOST_ASSERT( bindings::size(e) >= bindings::size(d)-1 );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_rwork( bindings::size(d) ));
     return detail::ptcon( bindings::size(d), bindings::begin_value(d),
             bindings::begin_value(e), anorm, rcond,
             bindings::begin_value(work.select(real_type())) );
 }
Example #13
0
 static void invoke( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
         detail::workspace1< WORK > work ) {
     BOOST_ASSERT( traits::matrix_uplo_tag(a) == 'U' ||
             traits::matrix_uplo_tag(a) == 'L' );
     BOOST_ASSERT( traits::matrix_num_columns(a) >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= std::max(1,
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( $CALL_MIN_SIZE ));
     detail::sytrf( traits::matrix_uplo_tag(a),
             traits::matrix_num_columns(a), traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(ipiv),
             traits::vector_storage(work.select(real_type())),
             traits::vector_size(work.select(real_type())), info );
 }
Example #14
0
 static std::ptrdiff_t invoke( const char norm, const MatrixA& a,
         detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef typename result_of::uplo_tag< MatrixA >::type uplo;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( norm, bindings::size_column(a) ));
     BOOST_ASSERT( bindings::size_column(a) >= 0 );
     BOOST_ASSERT( bindings::size_minor(a) == 1 ||
             bindings::stride_minor(a) == 1 );
     BOOST_ASSERT( bindings::stride_major(a) >= std::max<
             std::ptrdiff_t >(bindings::size_column(a),1) );
     return detail::lansy( norm, uplo(), bindings::size_column(a),
             bindings::begin_value(a), bindings::stride_major(a),
             bindings::begin_value(work.select(real_type())) );
 }
Example #15
0
 static void invoke( char const vect, integer_t const m, integer_t const n,
         integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
         detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorTAU >::value_type >::value) );
     BOOST_ASSERT( vect == 'Q' || vect == 'P' );
     BOOST_ASSERT( m >= 0 );
     BOOST_ASSERT( k >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= m );
     BOOST_ASSERT( traits::vector_size(work.select(value_type())) >=
             min_size_work( m, n ));
     detail::ungbr( vect, m, n, k, traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(tau),
             traits::vector_storage(work.select(value_type())),
             traits::vector_size(work.select(value_type())), info );
 }
Example #16
0
 static std::ptrdiff_t invoke( const VectorD& d, const VectorE& e,
         const real_type anorm, real_type& rcond, detail::workspace1<
         WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorD >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorE >::type >::type >::value) );
     BOOST_ASSERT( bindings::size(d) >= bindings::size(d) );
     BOOST_ASSERT( bindings::size(d) >= 0 );
     BOOST_ASSERT( bindings::size(e) >= bindings::size(d)-1 );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( bindings::size(d) ));
     return detail::ptcon( bindings::size(d), bindings::begin_value(d),
             bindings::begin_value(e), anorm, rcond,
             bindings::begin_value(work.select(real_type())) );
 }
Example #17
0
 static std::ptrdiff_t invoke( const char norm, const MatrixAB& ab,
         detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
     BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
     BOOST_ASSERT( bindings::bandwidth_upper(ab) >= 0 );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( norm, bindings::size_column(ab) ));
     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) >=
             bindings::bandwidth_lower(ab)+bindings::bandwidth_upper(ab)+
             1 );
     return detail::langb( norm, bindings::size_column(ab),
             bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
             bindings::begin_value(ab), bindings::stride_major(ab),
             bindings::begin_value(work.select(real_type())) );
 }
Example #18
0
 static void invoke( MatrixA& a, VectorTAU& tau, integer_t& info,
         detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorTAU >::value_type >::value) );
     BOOST_ASSERT( traits::matrix_num_rows(a) >= 0 );
     BOOST_ASSERT( traits::matrix_num_columns(a) >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= std::max(1,
             traits::matrix_num_rows(a)) );
     BOOST_ASSERT( traits::vector_size(tau) >=
             std::min(traits::matrix_num_rows(a),
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( $CALL_MIN_SIZE ));
     detail::geqrf( traits::matrix_num_rows(a),
             traits::matrix_num_columns(a), traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(tau),
             traits::vector_storage(work.select(real_type())),
             traits::vector_size(work.select(real_type())), info );
 }
Example #19
0
 static void invoke( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
         VectorTAUP& taup, integer_t& info, detail::workspace1<
         WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorD >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorE >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorTAUQ >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorTAUP >::value_type >::value) );
     BOOST_ASSERT( traits::matrix_num_rows(a) >= 0 );
     BOOST_ASSERT( traits::matrix_num_columns(a) >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= std::max(1,
             traits::matrix_num_rows(a)) );
     BOOST_ASSERT( traits::vector_size(d) >=
             std::min(traits::matrix_num_rows(a),
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(tauq) >=
             std::min(traits::matrix_num_rows(a),
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(taup) >=
             std::min(traits::matrix_num_rows(a),
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( traits::matrix_num_rows(a),
             traits::matrix_num_columns(a) ));
     detail::gebrd( traits::matrix_num_rows(a),
             traits::matrix_num_columns(a), traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(d),
             traits::vector_storage(e), traits::vector_storage(tauq),
             traits::vector_storage(taup),
             traits::vector_storage(work.select(real_type())),
             traits::vector_size(work.select(real_type())), info );
 }
Example #20
0
 static void invoke( char const jobz, integer_t const n,
         integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
         integer_t& info, detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAB >::value_type, typename traits::vector_traits<
             VectorW >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAB >::value_type, typename traits::matrix_traits<
             MatrixZ >::value_type >::value) );
     BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
     BOOST_ASSERT( traits::matrix_uplo_tag(ab) == 'U' ||
             traits::matrix_uplo_tag(ab) == 'L' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( kd >= 0 );
     BOOST_ASSERT( traits::leading_dimension(ab) >= kd );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( n ));
     detail::sbev( jobz, traits::matrix_uplo_tag(ab), n, kd,
             traits::matrix_storage(ab), traits::leading_dimension(ab),
             traits::vector_storage(w), traits::matrix_storage(z),
             traits::leading_dimension(z),
             traits::vector_storage(work.select(real_type())), info );
 }
Example #21
0
 static void invoke( char const vect, integer_t const n,
         integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
         MatrixQ& q, integer_t& info, detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::vector_traits<
             VectorD >::value_type, typename traits::vector_traits<
             VectorE >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAB >::value_type, typename traits::matrix_traits<
             MatrixQ >::value_type >::value) );
     BOOST_ASSERT( vect == 'N' || vect == 'V' || vect == 'U' );
     BOOST_ASSERT( traits::matrix_uplo_tag(a) == 'U' ||
             traits::matrix_uplo_tag(a) == 'L' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( kd >= 0 );
     BOOST_ASSERT( traits::leading_dimension(ab) >= kd+1 );
     BOOST_ASSERT( traits::vector_size(d) >= n );
     BOOST_ASSERT( traits::vector_size(work.select(value_type())) >=
             min_size_work( n ));
     detail::hbtrd( vect, traits::matrix_uplo_tag(a), n, kd,
             traits::matrix_storage(ab), traits::leading_dimension(ab),
             traits::vector_storage(d), traits::vector_storage(e),
             traits::matrix_storage(q), traits::leading_dimension(q),
             traits::vector_storage(work.select(value_type())), info );
 }
Example #22
0
 static void invoke( integer_t const itype, char const jobz,
                     integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
                     MatrixZ& z, integer_t& info, detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                           MatrixAP >::value_type, typename traits::matrix_traits<
                           MatrixBP >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                           MatrixAP >::value_type, typename traits::vector_traits<
                           VectorW >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
                           MatrixAP >::value_type, typename traits::matrix_traits<
                           MatrixZ >::value_type >::value) );
     BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
     BOOST_ASSERT( traits::matrix_uplo_tag(ap) == 'U' ||
                   traits::matrix_uplo_tag(ap) == 'L' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
                   min_size_work( n ));
     detail::spgv( itype, jobz, traits::matrix_uplo_tag(ap), n,
                   traits::matrix_storage(ap), traits::matrix_storage(bp),
                   traits::vector_storage(w), traits::matrix_storage(z),
                   traits::leading_dimension(z),
                   traits::vector_storage(work.select(real_type())), info );
 }
Example #23
0
 static std::ptrdiff_t invoke( const fortran_int_t n,
                               const fortran_int_t ilo, const fortran_int_t ihi,
                               MatrixA& a, const VectorTAU& tau, detail::workspace1<
                               WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                           typename bindings::value_type< MatrixA >::type >::type,
                           typename remove_const< typename bindings::value_type<
                           VectorTAU >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
     BOOST_ASSERT( bindings::size(tau) >= n-1 );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
                   min_size_work( ihi, ilo ));
     BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                   bindings::stride_minor(a) == 1 );
     BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
                   n) );
     BOOST_ASSERT( n >= 0 );
     return detail::orghr( n, ilo, ihi, bindings::begin_value(a),
                           bindings::stride_major(a), bindings::begin_value(tau),
                           bindings::begin_value(work.select(real_type())),
                           bindings::size(work.select(real_type())) );
 }
Example #24
0
 static void invoke( char const uplo, VectorAP& ap, VectorTAU& tau,
         MatrixQ& q, integer_t& info, detail::workspace1< WORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::vector_traits<
             VectorAP >::value_type, typename traits::vector_traits<
             VectorTAU >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::vector_traits<
             VectorAP >::value_type, typename traits::matrix_traits<
             MatrixQ >::value_type >::value) );
     BOOST_ASSERT( uplo == 'U' || uplo == 'L' );
     BOOST_ASSERT( traits::matrix_num_columns(q) >= 0 );
     BOOST_ASSERT( traits::vector_size(ap) >=
             traits::matrix_num_columns(q)*(traits::matrix_num_columns(q)+
             1)/2 );
     BOOST_ASSERT( traits::vector_size(tau) >=
             traits::matrix_num_columns(q)-1 );
     BOOST_ASSERT( traits::leading_dimension(q) >= std::max(1,
             traits::matrix_num_columns(q)) );
     BOOST_ASSERT( traits::vector_size(work.select(value_type())) >=
             min_size_work( traits::matrix_num_columns(q) ));
     detail::upgtr( uplo, traits::matrix_num_columns(q),
             traits::vector_storage(ap), traits::vector_storage(tau),
             traits::matrix_storage(q), traits::leading_dimension(q),
             traits::vector_storage(work.select(value_type())), info );
 }
Example #25
0
 static std::ptrdiff_t invoke( const char jobu, const char jobv,
         const char jobq, const fortran_int_t k,
         const fortran_int_t l, MatrixA& a, MatrixB& b,
         const real_type tola, const real_type tolb, VectorALPHA& alpha,
         VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
         fortran_int_t& ncycle, detail::workspace1< WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixU >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixV >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixQ >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorALPHA >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorBETA >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixA >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixB >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixA >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixU >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixA >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixV >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixA >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixQ >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorALPHA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBETA >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixU >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixV >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixQ >::value) );
     BOOST_ASSERT( bindings::size(alpha) >= bindings::size_column(a) );
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_work( bindings::size_column(a) ));
     BOOST_ASSERT( bindings::size_column(a) >= 0 );
     BOOST_ASSERT( bindings::size_minor(a) == 1 ||
             bindings::stride_minor(a) == 1 );
     BOOST_ASSERT( bindings::size_minor(b) == 1 ||
             bindings::stride_minor(b) == 1 );
     BOOST_ASSERT( bindings::size_minor(q) == 1 ||
             bindings::stride_minor(q) == 1 );
     BOOST_ASSERT( bindings::size_minor(u) == 1 ||
             bindings::stride_minor(u) == 1 );
     BOOST_ASSERT( bindings::size_minor(v) == 1 ||
             bindings::stride_minor(v) == 1 );
     BOOST_ASSERT( bindings::size_row(a) >= 0 );
     BOOST_ASSERT( bindings::size_row(b) >= 0 );
     BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
             bindings::size_row(a)) );
     BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
             bindings::size_row(b)) );
     BOOST_ASSERT( jobq == 'Q' || jobq == 'I' || jobq == 'N' );
     BOOST_ASSERT( jobu == 'U' || jobu == 'I' || jobu == 'N' );
     BOOST_ASSERT( jobv == 'V' || jobv == 'I' || jobv == 'N' );
     return detail::tgsja( jobu, jobv, jobq, bindings::size_row(a),
             bindings::size_row(b), bindings::size_column(a), k, l,
             bindings::begin_value(a), bindings::stride_major(a),
             bindings::begin_value(b), bindings::stride_major(b), tola,
             tolb, bindings::begin_value(alpha),
             bindings::begin_value(beta), bindings::begin_value(u),
             bindings::stride_major(u), bindings::begin_value(v),
             bindings::stride_major(v), bindings::begin_value(q),
             bindings::stride_major(q),
             bindings::begin_value(work.select(value_type())), ncycle );
 }
Example #26
0
 static std::ptrdiff_t invoke( const Side side, const char eigsrc,
         const char initv, VectorSELECT& select, const MatrixH& h,
         VectorWR& wr, const VectorWI& wi, MatrixVL& vl, MatrixVR& vr,
         const fortran_int_t mm, fortran_int_t& m,
         VectorIFAILL& ifaill, VectorIFAILR& ifailr, detail::workspace1<
         WORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixH >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixVL >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixVR >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixH >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorWR >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixH >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorWI >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixH >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixVL >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixH >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixVR >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorIFAILL >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorIFAILR >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorSELECT >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorWR >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixVL >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixVR >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIFAILL >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIFAILR >::value) );
     BOOST_ASSERT( bindings::size(select) >= bindings::size_column(h) );
     BOOST_ASSERT( bindings::size(wi) >= bindings::size_column(h) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( bindings::size_column(h) ));
     BOOST_ASSERT( bindings::size(wr) >= bindings::size_column(h) );
     BOOST_ASSERT( bindings::size_column(h) >= 0 );
     BOOST_ASSERT( bindings::size_minor(h) == 1 ||
             bindings::stride_minor(h) == 1 );
     BOOST_ASSERT( bindings::size_minor(vl) == 1 ||
             bindings::stride_minor(vl) == 1 );
     BOOST_ASSERT( bindings::size_minor(vr) == 1 ||
             bindings::stride_minor(vr) == 1 );
     BOOST_ASSERT( bindings::stride_major(h) >= std::max< std::ptrdiff_t >(1,
             bindings::size_column(h)) );
     BOOST_ASSERT( eigsrc == 'Q' || eigsrc == 'N' );
     BOOST_ASSERT( initv == 'N' || initv == 'U' );
     return detail::hsein( side, eigsrc, initv,
             bindings::begin_value(select), bindings::size_column(h),
             bindings::begin_value(h), bindings::stride_major(h),
             bindings::begin_value(wr), bindings::begin_value(wi),
             bindings::begin_value(vl), bindings::stride_major(vl),
             bindings::begin_value(vr), bindings::stride_major(vr), mm, m,
             bindings::begin_value(work.select(real_type())),
             bindings::begin_value(ifaill), bindings::begin_value(ifailr) );
 }