Exemple #1
0
 BOOST_FORCEINLINE result_type operator()( A0& a, A1& scale
                                         , A2& ilo, A3& ihi, C0 job) const
 {
    result_type info;
    nt2_la_int  n   = nt2::width(a);
    BOOST_ASSERT_MSG(n == nt2_la_int(nt2::height(a)), "input must be square");
    nt2_la_int  lda = nt2::max(a.leading_size(), One<size_t>());
    NT2_F77NAME(cgebal) (&job, &n
                        , a.raw(), &lda
                        , &ilo, &ihi
                        , scale.raw(), &info);
    return info;
 }
Exemple #2
0
     BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1, A2& a2) const
     {
        result_type that;
        nt2_la_int  n  = std::min(nt2::height(a0),nt2::width(a0));
        nt2_la_int  lda = n;
        nt2_la_int  nhrs = nt2::width(a2);
        nt2_la_int  ldb = a2.leading_size();

        a1.resize(nt2::of_size(n,1));

        magma_zgesv(n,nhrs,(cuDoubleComplex*)a0.raw(),lda,a1.raw()
                   ,(cuDoubleComplex*)a2.raw(),ldb,&that);

        return that;
     }
Exemple #3
0
    BOOST_FORCEINLINE result_type operator()(A0 const& a0, A1 const&a1, A2 const& a2) const
    {
      result_type rcond;
      nt2_la_int n = nt2::height(a0);
      nt2_la_int ld = n;
      nt2_la_int info;
      char uplo = 'L';

      nt2::memory::container<tag::table_, v_t, nt2::_2D> work(nt2::of_size(2*n,1));

      NT2_F77NAME(zsycon) ( &uplo, &n, a0.raw(), &ld, a1.raw(), &a2, &rcond
                          , work.raw(), &info
                          );

      return rcond;
    }