Esempio n. 1
0
 BOOST_FORCEINLINE result_type operator()( A0& a, A1& b, A2& alpha, A3& beta, A4& vr, A5& vl) const
 {
   result_type info = 0;
   char jobvr = 'V';
   char jobvl = 'V';
   details::workspace<typename A0::value_type> wk;
   nt2_la_int n = nt2::width(a);
   BOOST_ASSERT_MSG(  (n == nt2_la_int(nt2::height(a)))
                      &&(n == nt2_la_int(nt2::height(b))) , "inputs must be square");
   nt2_la_int lda  = nt2::max(a.leading_size(), One<size_t>());
   nt2_la_int ldb  = nt2::max(b.leading_size(), One<size_t>());
   nt2_la_int ldvl = n;
   nt2_la_int ldvr = n;
   NT2_F77NAME(zggev) ( &jobvl, &jobvr
                      , &n
                      , 0 /*a*/, &lda
                      , 0 /*b*/, &ldb
                      , 0/*alpha*/
                      , 0/*beta*/
                      , 0/*vl*/, &ldvl
                      , 0/*vr*/, &ldvr
                      , wk.main(), details::query()
                      , wk.reals()
                      , &info);
   info = nt2::ggev_wvrvl(a, b, alpha, beta, vr, vl, wk);
   return info;
 }
Esempio n. 2
0
     BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1) const
     {
        result_type that;
        nt2_la_int  n  = nt2::width(a0);
        nt2_la_int  ld = a0.leading_size();
        nt2_la_int  ldb = a1.leading_size();
        nt2_la_int  nhrs = nt2::width(a1);
        char uplo = 'L';

        NT2_F77NAME(zposv) ( &uplo, &n, &nhrs, a0.data(), &ld, a1.data(), &ldb
                           , &that
                            );

        return that;
     }
Esempio n. 3
0
     BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1,A2& a2) const
     {
        result_type that;
        details::workspace<typename A2::value_type> w;
        nt2_la_int  m  = nt2::height(a0);
        nt2_la_int  ld = a0.leading_size();
        nt2_la_int  k  = a1.leading_size();
        char side  = 'L';
        char trans = 'N';

        NT2_F77NAME(sormqr) (&side,&trans,&m, &m, &k, 0, &ld, 0, 0, &m, w.main()
                            , details::query(), &that
                            );
        w.prepare_main();

        nt2::mqr(a0,a1,a2,w);

        return that;
     }
Esempio n. 4
0
     BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1) const
     {
        result_type that;
        nt2_la_int  m  = nt2::height(a0);
        nt2_la_int  n  = nt2::width(a0);
        nt2_la_int  ld = a0.leading_size();
        nt2_la_int  k  = a1.leading_size();

        details::workspace<typename A0::value_type> w;

        NT2_F77NAME(sorgqr)(&m, &n, &k,  0, &ld, 0, w.main()
                          , details::query(), &that
                           );

        w.prepare_main();
        nt2::gqr(a0,a1,w);

        return that;
     }