当前位置: 首页>>代码示例>>C++>>正文


C++ A1类代码示例

本文整理汇总了C++中A1的典型用法代码示例。如果您正苦于以下问题:C++ A1类的具体用法?C++ A1怎么用?C++ A1使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了A1类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: operator

     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();

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

        magma_cgetrf(m, n, (cuFloatComplex*)a0.data(), ld, a1.data(), &that);
        return that;
     }
开发者ID:aminiussi,项目名称:nt2,代码行数:12,代码来源:getrf.hpp

示例2: operator

     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;
     }
开发者ID:JanVogelgesang,项目名称:nt2,代码行数:15,代码来源:posv.hpp

示例3: operator

     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.data(),lda,a1.data()
                   ,(cuDoubleComplex*)a2.data(),ldb,&that);

        return that;
     }
开发者ID:aminiussi,项目名称:nt2,代码行数:15,代码来源:gesv.hpp

示例4: operator

    result_type operator()(A0& yi, A1& inputs) const
    {
        yi.resize(inputs.extent());
        const child0 & x   =  boost::proto::child_c<0>(inputs);
        if (numel(x) <=  1)
            BOOST_ASSERT_MSG(numel(x) >  1, "Interpolation requires at least two sample points in each dimension.");
        else
        {
            BOOST_ASSERT_MSG(issorted(x, 'a'), "for 'nearest' interpolation x values must be sorted in ascending order");
            const child1 & y   =  boost::proto::child_c<1>(inputs);
            BOOST_ASSERT_MSG(numel(x) == numel(y), "The grid vectors do not define a grid of points that match the given values.");
            const child2 & xi  =  boost::proto::child_c<2>(inputs);
            bool extrap = false;
            value_type extrapval = Nan<value_type>();
            choices(inputs, extrap, extrapval, N1());
            table<index_type>   index = bsearch (x, xi);
            table<value_type>  dx    =  xi-x(index);
            table<index_type> indexp1 =  oneplus(index);
            yi = y(nt2::if_else(lt(nt2::abs(xi-x(index)), nt2::abs(xi-x(indexp1))), index,  indexp1));
            value_type  b =  value_type(x(begin_));
            value_type  e =  value_type(x(end_));
            if (!extrap) yi = nt2::if_else(nt2::logical_or(boost::simd::is_nge(xi, b),
                                               boost::simd::is_nle(xi, e)), extrapval, yi);
        }

        return yi;
    }
开发者ID:kevinushey,项目名称:nt2,代码行数:27,代码来源:nearest.hpp

示例5: operator

 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;
 }
开发者ID:JanVogelgesang,项目名称:nt2,代码行数:27,代码来源:ggev_wvrvl.hpp

示例6: operator

 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;
 }
开发者ID:gilbert0571,项目名称:nt2,代码行数:13,代码来源:gebal.hpp

示例7: operator

    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;
    }
开发者ID:atyuwen,项目名称:nt2,代码行数:16,代码来源:sycon.hpp

示例8: operator

     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;
     }
开发者ID:gilbert0571,项目名称:nt2,代码行数:19,代码来源:mqr.hpp

示例9: operator

     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;
     }
开发者ID:gilbert0571,项目名称:nt2,代码行数:19,代码来源:gqr.hpp

示例10: operator

    BOOST_FORCEINLINE result_type
    operator()(A0& a0, A1& a1) const
    {
      a0.resize(a1.extent());

      input_type input = boost::proto::child_c<0>(a1);
      extent_type ext = input.extent();
      std::size_t dim = nt2::ndims(ext);
      std::size_t red = reduction_dim(a1, boost::mpl::bool_<!(boost::proto::arity_of<A1>::value <= 1)>());

#if 0
      if((red - 1 < ext.size() && ext[red-1] == 1) || ext.size() < red)
        return nt2::run_assign(a0, input);
#endif

      if(dim == 1 && red == 1)
      {
        nt2::run( a0, 0u
                , nt2::fold( input
                           , typename nt2::make_functor<Neutral1, A0>::type()
                           , typename nt2::make_functor<O1, A0>::type()
                           , typename nt2::make_functor<T1, A0>::type()
                           )
                );

      }
      else if(red == 1)
      {
        nt2::inner_fold( a0
                       , input
                       , typename nt2::make_functor<Neutral1, A0>::type()
                       , typename nt2::make_functor<O1, A0>::type()
                       , typename nt2::make_functor<T1, A0>::type()
                       );
      }
#if 0
      else if(red == ext.size())
      {
        nt2::outer_fold( a0
                       , input
                       , typename nt2::make_functor<Neutral1, A0>::type()
                       , typename nt2::make_functor<O1, A0>::type()
                       , typename nt2::make_functor<T1, A0>::type()
                       );
      }
#endif
      else
      {
        std::size_t inner = red-1 < ext.size() ? ext[red-1] : 1;

        std::size_t lo = std::accumulate( ext.begin()
                                        , ext.begin()+std::min(red-1, dim)
                                        , std::size_t(1)
                                        , std::multiplies<std::size_t>()
                                        );

        std::size_t hi = std::accumulate( ext.begin()+std::min(red, dim)
                                        , ext.begin()+dim
                                        , std::size_t(1)
                                        , std::multiplies<std::size_t>()
                                        );

        nt2::partial_fold( reshape(a0, of_size(lo, hi))
                         , reshape(input, of_size(lo, inner, hi))
                         , typename nt2::make_functor<Neutral1, A0>::type()
                         , typename nt2::make_functor<O1, A0>::type()
                         , typename nt2::make_functor<T1, A0>::type()
                         );
      }

      return a0;
    }
开发者ID:KWMalik,项目名称:nt2,代码行数:72,代码来源:run.hpp

示例11: eval

 static RT
 eval(Env const& env, A0& _0, A1& _1)
 {
     return new T(_0.eval(env), _1.eval(env));
 }
开发者ID:00liujj,项目名称:dealii,代码行数:5,代码来源:new.hpp

示例12: operator

 R operator () ( const F &f, const A1 &l ) const {
     return f( l.x(), l.y() );
 }
开发者ID:EEmmanuel7,项目名称:AnimRay,代码行数:3,代码来源:texture-policy.hpp

示例13:

void
F::addMatch (const QString &&)
{
  m_matchingMimeTypes.clear ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:5,代码来源:pr64612.C


注:本文中的A1类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。