Beispiel #1
0
 static void invoke( char const range, char const order, integer_t const n,
         real_type const vl, real_type const vu, integer_t const il,
         integer_t const iu, real_type const abstol, VectorD& d,
         VectorE& e, integer_t& m, integer_t& nsplit, VectorW& w,
         VectorIBLOCK& iblock, VectorISPLIT& isplit, integer_t& info,
         detail::workspace2< WORK, IWORK > 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::vector_traits<
             VectorD >::value_type, typename traits::vector_traits<
             VectorW >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::vector_traits<
             VectorIBLOCK >::value_type, typename traits::vector_traits<
             VectorISPLIT >::value_type >::value) );
     BOOST_ASSERT( range == 'A' || range == 'V' || range == 'I' );
     BOOST_ASSERT( order == 'B' || order == 'E' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( traits::vector_size(d) >= n );
     BOOST_ASSERT( traits::vector_size(e) >= n-1 );
     BOOST_ASSERT( traits::vector_size(w) >= n );
     BOOST_ASSERT( traits::vector_size(isplit) >= n );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( n ));
     BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
             min_size_iwork( n ));
     detail::stebz( range, order, n, vl, vu, il, iu, abstol,
             traits::vector_storage(d), traits::vector_storage(e), m,
             nsplit, traits::vector_storage(w),
             traits::vector_storage(iblock),
             traits::vector_storage(isplit),
             traits::vector_storage(work.select(real_type())),
             traits::vector_storage(work.select(integer_t())), info );
 }
Beispiel #2
0
 static std::ptrdiff_t invoke( const Side side, const char eigsrc,
         const char initv, const VectorSELECT& select, const MatrixH& h,
         VectorW& w, MatrixVL& vl, MatrixVR& vr,
         const fortran_int_t mm, fortran_int_t& m,
         VectorIFAILL& ifaill, VectorIFAILR& ifailr, detail::workspace2<
         WORK, RWORK > 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< VectorIFAILL >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorIFAILR >::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<
             VectorW >::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( (bindings::is_mutable< VectorW >::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(w) >= bindings::size_column(h) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_rwork( bindings::size_column(h) ));
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_work( 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(w), bindings::begin_value(vl),
             bindings::stride_major(vl), bindings::begin_value(vr),
             bindings::stride_major(vr), mm, m,
             bindings::begin_value(work.select(value_type())),
             bindings::begin_value(work.select(real_type())),
             bindings::begin_value(ifaill), bindings::begin_value(ifailr) );
 }
Beispiel #3
0
 static void invoke( char const fact, MatrixA& a, MatrixAF& af,
         char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
         VectorFERR& ferr, VectorBERR& berr, integer_t& info,
         detail::workspace2< WORK, IWORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::matrix_traits<
             MatrixAF >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorS >::value_type >::value) );
     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::matrix_traits<
             MatrixX >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorFERR >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorBERR >::value_type >::value) );
     BOOST_ASSERT( fact == 'F' || fact == 'Y' || fact == 'N' ||
             fact == 'E' );
     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::matrix_num_columns(x) >= 0 );
     BOOST_ASSERT( traits::leading_dimension(a) >= std::max(1,
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::leading_dimension(af) >= std::max(1,
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( equed == 'N' || equed == 'Y' );
     BOOST_ASSERT( traits::leading_dimension(b) >= std::max(1,
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::leading_dimension(x) >= std::max(1,
             traits::matrix_num_columns(a)) );
     BOOST_ASSERT( traits::vector_size(berr) >=
             traits::matrix_num_columns(x) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( traits::matrix_num_columns(a) ));
     BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
             min_size_iwork( traits::matrix_num_columns(a) ));
     detail::posvx( fact, traits::matrix_uplo_tag(a),
             traits::matrix_num_columns(a), traits::matrix_num_columns(x),
             traits::matrix_storage(a), traits::leading_dimension(a),
             traits::matrix_storage(af), traits::leading_dimension(af),
             equed, traits::vector_storage(s), traits::matrix_storage(b),
             traits::leading_dimension(b), traits::matrix_storage(x),
             traits::leading_dimension(x), rcond,
             traits::vector_storage(ferr), traits::vector_storage(berr),
             traits::vector_storage(work.select(real_type())),
             traits::vector_storage(work.select(integer_t())), info );
 }
Beispiel #4
0
 static std::ptrdiff_t invoke( const char uplo, const char compq,
         const fortran_int_t n, VectorD& d, VectorE& e, MatrixU& u,
         MatrixVT& vt, VectorQ& q, VectorIQ& iq, detail::workspace2< WORK,
         IWORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixU >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixVT >::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<
             MatrixU >::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<
             MatrixVT >::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<
             VectorQ >::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< MatrixU >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixVT >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorQ >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIQ >::value) );
     BOOST_ASSERT( bindings::size(e) >= n-1 );
     BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
             min_size_iwork( n ));
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( compq, n ));
     BOOST_ASSERT( bindings::size_minor(u) == 1 ||
             bindings::stride_minor(u) == 1 );
     BOOST_ASSERT( bindings::size_minor(vt) == 1 ||
             bindings::stride_minor(vt) == 1 );
     BOOST_ASSERT( compq == 'N' || compq == 'P' || compq == 'I' );
     BOOST_ASSERT( n >= 0 );
     return detail::bdsdc( uplo, compq, n, bindings::begin_value(d),
             bindings::begin_value(e), bindings::begin_value(u),
             bindings::stride_major(u), bindings::begin_value(vt),
             bindings::stride_major(vt), bindings::begin_value(q),
             bindings::begin_value(iq),
             bindings::begin_value(work.select(real_type())),
             bindings::begin_value(work.select(fortran_int_t())) );
 }
Beispiel #5
0
 static std::ptrdiff_t invoke( const MatrixAP& ap, const VectorIPIV& ipiv,
         const real_type anorm, real_type& rcond, detail::workspace2< WORK,
         IWORK > 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(fortran_int_t())) >=
             min_size_iwork( bindings::size_column(ap) ));
     BOOST_ASSERT( bindings::size(work.select(real_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(real_type())),
             bindings::begin_value(work.select(fortran_int_t())) );
 }
Beispiel #6
0
 static std::ptrdiff_t invoke( const fortran_int_t n, VectorX& x,
         real_type& est, fortran_int_t& kase, detail::workspace2< V,
         ISGN > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorX >::value) );
     BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
             min_size_isgn( n ));
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_v( n ));
     BOOST_ASSERT( n >= 1 );
     return detail::lacon( n,
             bindings::begin_value(work.select(real_type())),
             bindings::begin_value(x),
             bindings::begin_value(work.select(fortran_int_t())), est,
             kase );
 }
Beispiel #7
0
 static void invoke( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
         VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
         VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
         IWORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAP >::value_type, typename traits::matrix_traits<
             MatrixAFP >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAP >::value_type, typename traits::matrix_traits<
             MatrixB >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAP >::value_type, typename traits::matrix_traits<
             MatrixX >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAP >::value_type, typename traits::vector_traits<
             VectorFERR >::value_type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAP >::value_type, typename traits::vector_traits<
             VectorBERR >::value_type >::value) );
     BOOST_ASSERT( traits::matrix_uplo_tag(a) == 'U' ||
             traits::matrix_uplo_tag(a) == 'L' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( traits::matrix_num_columns(x) >= 0 );
     BOOST_ASSERT( traits::vector_size(afp) >= n*(n+1)/2 );
     BOOST_ASSERT( traits::vector_size(ipiv) >= n );
     BOOST_ASSERT( traits::leading_dimension(b) >= std::max(1,n) );
     BOOST_ASSERT( traits::leading_dimension(x) >= std::max(1,n) );
     BOOST_ASSERT( traits::vector_size(berr) >=
             traits::matrix_num_columns(x) );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( n ));
     BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
             min_size_iwork( n ));
     detail::sprfs( traits::matrix_uplo_tag(a), n,
             traits::matrix_num_columns(x), traits::matrix_storage(ap),
             traits::matrix_storage(afp), traits::vector_storage(ipiv),
             traits::matrix_storage(b), traits::leading_dimension(b),
             traits::matrix_storage(x), traits::leading_dimension(x),
             traits::vector_storage(ferr), traits::vector_storage(berr),
             traits::vector_storage(work.select(real_type())),
             traits::vector_storage(work.select(integer_t())), info );
 }
Beispiel #8
0
 static std::ptrdiff_t invoke( const char norm, const MatrixA& a,
         const real_type anorm, real_type& rcond, detail::workspace2< WORK,
         RWORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_rwork( 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::stride_major(a) >= std::max< std::ptrdiff_t >(1,
             bindings::size_column(a)) );
     BOOST_ASSERT( norm == '1' || norm == 'O' || norm == 'I' );
     return detail::gecon( norm, bindings::size_column(a),
             bindings::begin_value(a), bindings::stride_major(a), anorm,
             rcond, bindings::begin_value(work.select(value_type())),
             bindings::begin_value(work.select(real_type())) );
 }
Beispiel #9
0
 static std::ptrdiff_t invoke( const char range, const char order,
         const fortran_int_t n, const real_type vl, const real_type vu,
         const fortran_int_t il, const fortran_int_t iu,
         const real_type abstol, const VectorD& d, const VectorE& e,
         fortran_int_t& m, fortran_int_t& nsplit, VectorW& w,
         VectorIBLOCK& iblock, VectorISPLIT& isplit, detail::workspace2<
         WORK, IWORK > 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_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorD >::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< VectorIBLOCK >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorISPLIT >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorW >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIBLOCK >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorISPLIT >::value) );
     BOOST_ASSERT( bindings::size(d) >= n );
     BOOST_ASSERT( bindings::size(e) >= n-1 );
     BOOST_ASSERT( bindings::size(isplit) >= n );
     BOOST_ASSERT( bindings::size(w) >= n );
     BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
             min_size_iwork( n ));
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( n ));
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( order == 'B' || order == 'E' );
     BOOST_ASSERT( range == 'A' || range == 'V' || range == 'I' );
     return detail::stebz( range, order, n, vl, vu, il, iu, abstol,
             bindings::begin_value(d), bindings::begin_value(e), m, nsplit,
             bindings::begin_value(w), bindings::begin_value(iblock),
             bindings::begin_value(isplit),
             bindings::begin_value(work.select(real_type())),
             bindings::begin_value(work.select(fortran_int_t())) );
 }
Beispiel #10
0
 static void invoke( char const jobz, char const range, integer_t const n,
         integer_t const ka, integer_t const kb, MatrixAB& ab,
         MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
         integer_t const il, integer_t const iu, real_type const abstol,
         integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
         integer_t& info, detail::workspace2< WORK, IWORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixAB >::value_type, typename traits::matrix_traits<
             MatrixBB >::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_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( range == 'A' || range == 'V' || range == 'I' );
     BOOST_ASSERT( traits::matrix_uplo_tag(ab) == 'U' ||
             traits::matrix_uplo_tag(ab) == 'L' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( ka >= 0 );
     BOOST_ASSERT( kb >= 0 );
     BOOST_ASSERT( traits::leading_dimension(ab) >= ka+1 );
     BOOST_ASSERT( traits::leading_dimension(bb) >= kb+1 );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( n ));
     BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
             min_size_iwork( n ));
     detail::sbgvx( jobz, range, traits::matrix_uplo_tag(ab), n, ka, kb,
             traits::matrix_storage(ab), traits::leading_dimension(ab),
             traits::matrix_storage(bb), traits::leading_dimension(bb),
             traits::matrix_storage(q), traits::leading_dimension(q), vl,
             vu, il, iu, abstol, m, traits::vector_storage(w),
             traits::matrix_storage(z), traits::leading_dimension(z),
             traits::vector_storage(work.select(real_type())),
             traits::vector_storage(work.select(integer_t())),
             traits::vector_storage(ifail), info );
 }
Beispiel #11
0
 static std::ptrdiff_t invoke( const char jobz, const fortran_int_t n,
         VectorD& d, VectorE& e, MatrixZ& z, detail::workspace2< WORK,
         IWORK > 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(e) >= n-1 );
     BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
             min_size_iwork( jobz, n ));
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_work( jobz, n ));
     BOOST_ASSERT( bindings::size_minor(z) == 1 ||
             bindings::stride_minor(z) == 1 );
     BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
     BOOST_ASSERT( n >= 0 );
     return detail::stevd( jobz, n, bindings::begin_value(d),
             bindings::begin_value(e), bindings::begin_value(z),
             bindings::stride_major(z),
             bindings::begin_value(work.select(real_type())),
             bindings::size(work.select(real_type())),
             bindings::begin_value(work.select(fortran_int_t())),
             bindings::size(work.select(fortran_int_t())) );
 }
Beispiel #12
0
 static std::ptrdiff_t invoke( const char jobz, const char range,
         MatrixAP& ap, const real_type vl, const real_type vu,
         const fortran_int_t il, const fortran_int_t iu,
         const real_type abstol, fortran_int_t& m, VectorW& w,
         MatrixZ& z, VectorIFAIL& ifail, detail::workspace2< WORK,
         IWORK > 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<
             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< VectorW >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixZ >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIFAIL >::value) );
     BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
             min_size_iwork( bindings::size_column(ap) ));
     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' );
     BOOST_ASSERT( range == 'A' || range == 'V' || range == 'I' );
     return detail::spevx( jobz, range, uplo(), bindings::size_column(ap),
             bindings::begin_value(ap), vl, vu, il, iu, abstol, m,
             bindings::begin_value(w), bindings::begin_value(z),
             bindings::stride_major(z),
             bindings::begin_value(work.select(real_type())),
             bindings::begin_value(work.select(fortran_int_t())),
             bindings::begin_value(ifail) );
 }
Beispiel #13
0
 static void invoke( char const jobz, MatrixA& a, VectorW& w,
         integer_t& info, detail::workspace2< WORK, IWORK > work ) {
     BOOST_STATIC_ASSERT( (boost::is_same< typename traits::matrix_traits<
             MatrixA >::value_type, typename traits::vector_traits<
             VectorW >::value_type >::value) );
     BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
     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( jobz, traits::matrix_num_columns(a) ));
     BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
             min_size_iwork( jobz, traits::matrix_num_columns(a) ));
     detail::syevd( jobz, traits::matrix_uplo_tag(a),
             traits::matrix_num_columns(a), traits::matrix_storage(a),
             traits::leading_dimension(a), traits::vector_storage(w),
             traits::vector_storage(work.select(real_type())),
             traits::vector_size(work.select(real_type())),
             traits::vector_storage(work.select(integer_t())),
             traits::vector_size(work.select(integer_t())), info );
 }
Beispiel #14
0
 static void invoke( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z, integer_t& info, detail::workspace2< WORK,
         IWORK > 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::vector_traits<
             VectorD >::value_type, typename traits::matrix_traits<
             MatrixZ >::value_type >::value) );
     BOOST_ASSERT( compz == 'N' || compz == 'I' || compz == 'V' );
     BOOST_ASSERT( n >= 0 );
     BOOST_ASSERT( traits::vector_size(e) >= n-1 );
     BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
             min_size_work( $CALL_MIN_SIZE ));
     BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
             min_size_iwork( compz, n ));
     detail::stedc( compz, n, traits::vector_storage(d),
             traits::vector_storage(e), traits::matrix_storage(z),
             traits::leading_dimension(z),
             traits::vector_storage(work.select(real_type())),
             traits::vector_size(work.select(real_type())),
             traits::vector_storage(work.select(integer_t())),
             traits::vector_size(work.select(integer_t())), info );
 }
Beispiel #15
0
 static std::ptrdiff_t invoke( const char fact, MatrixAB& ab,
         MatrixAFB& afb, char& equed, VectorS& s, MatrixB& b, MatrixX& x,
         real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
         detail::workspace2< WORK, RWORK > work ) {
     namespace bindings = ::boost::numeric::bindings;
     typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAFB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorS >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorFERR >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< VectorS >::type >::type,
             typename remove_const< typename bindings::value_type<
             VectorBERR >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixAB >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixAFB >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
             typename bindings::value_type< MatrixAB >::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< MatrixAB >::type >::type,
             typename remove_const< typename bindings::value_type<
             MatrixX >::type >::type >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixAB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixAFB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorS >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixX >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
     BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
     BOOST_ASSERT( bindings::bandwidth(ab, uplo()) >= 0 );
     BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
     BOOST_ASSERT( bindings::size(work.select(real_type())) >=
             min_size_rwork( bindings::size_column(ab) ));
     BOOST_ASSERT( bindings::size(work.select(value_type())) >=
             min_size_work( bindings::size_column(ab) ));
     BOOST_ASSERT( bindings::size_column(ab) >= 0 );
     BOOST_ASSERT( bindings::size_column(b) >= 0 );
     BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
             bindings::stride_minor(ab) == 1 );
     BOOST_ASSERT( bindings::size_minor(afb) == 1 ||
             bindings::stride_minor(afb) == 1 );
     BOOST_ASSERT( bindings::size_minor(b) == 1 ||
             bindings::stride_minor(b) == 1 );
     BOOST_ASSERT( bindings::size_minor(x) == 1 ||
             bindings::stride_minor(x) == 1 );
     BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
             uplo())+1 );
     BOOST_ASSERT( bindings::stride_major(afb) >= bindings::bandwidth(ab,
             uplo())+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,
             bindings::size_column(ab)) );
     BOOST_ASSERT( equed == 'N' || equed == 'Y' );
     BOOST_ASSERT( fact == 'F' || fact == 'Y' || fact == 'N' ||
             fact == 'E' );
     return detail::pbsvx( fact, uplo(), bindings::size_column(ab),
             bindings::bandwidth(ab, uplo()), bindings::size_column(b),
             bindings::begin_value(ab), bindings::stride_major(ab),
             bindings::begin_value(afb), bindings::stride_major(afb),
             equed, bindings::begin_value(s), bindings::begin_value(b),
             bindings::stride_major(b), bindings::begin_value(x),
             bindings::stride_major(x), rcond, bindings::begin_value(ferr),
             bindings::begin_value(berr),
             bindings::begin_value(work.select(value_type())),
             bindings::begin_value(work.select(real_type())) );
 }