BOOST_FORCEINLINE void eval2_2 ( A0& a0, A1& a1 , const T& ) const { nt2::container::table<type_t> work; NT2_AS_TERMINAL_INOUT(o_semantic , r, boost::proto::child_c<0>(a0), work); NT2_AS_TERMINAL_OUT (o_semantic , x, boost::proto::child_c<0>(a1)); nt2::container::table<type_t> tau; tie(x, tau) = qr(r, nt2::raw_); extract_qr(x, tau, r, T()); // extract raw or econ assign_swap(boost::proto::child_c<0>(a1), x); assign_swap(boost::proto::child_c<1>(a1), r); }
BOOST_FORCEINLINE void eval_qr( A0& a0, A1& a1 , nt2::container::table<type_t>& tau , Policy const& p ) { typedef typename boost::proto::result_of::child_c<A1&,0>::type c0_t; typedef typename meta::concrete<c0_t>::type c_t; c_t work = shallow_concrete ( boost::proto::child_c<0>(a1) , boost::proto::child_c<0>(a0) ); nt2_la_int info = eval_qrfull( work, tau, nt2::policy<ext::no_pivot_>()); boost::dispatch::ignore_unused(info); extract_qr(a1,work,tau,p); }
/////////////////////////////////////////////////////////////////////////////// /// INTERNAL ONLY: 2i 3o matrix_: tie(q, r, p) = qr(a, matrix_) BOOST_FORCEINLINE void eval2_3 ( A0& a0, A1& a1 , const nt2::policy<ext::matrix_>& ) const { nt2::container::table<type_t> work; NT2_AS_TERMINAL_INOUT(o_semantic, r , boost::proto::child_c<0>(a0), work); NT2_AS_TERMINAL_OUT (o_semantic, x , boost::proto::child_c<0>(a1)); nt2::container::table<type_t> tau; nt2::container::table<nt2_la_int> ip; tie(x, tau, ip) = qr(r, nt2::raw_); extract_qr(x, tau, r, nt2::policy<ext::raw_>()); assign_swap(boost::proto::child_c<0>(a1), x); assign_swap(boost::proto::child_c<1>(a1), r); boost::proto::child_c<2>(a1) = eye(numel(ip), nt2::meta::as_<type_t>())(nt2::_, ip); }
/////////////////////////////////////////////////////////////////////////////// /// INTERNAL ONLY: 2i 3o vector_: tie(q, r, ip) = qr(a, vector_) BOOST_FORCEINLINE void eval2_3 ( A0& a0, A1& a1 , const nt2::policy<ext::vector_>& ) const { nt2::container::table<type_t> work; NT2_AS_TERMINAL_INOUT(o_semantic, r , boost::proto::child_c<0>(a0), work); NT2_AS_TERMINAL_OUT (o_semantic, x , boost::proto::child_c<0>(a1)); NT2_AS_TERMINAL_OUT (i_semantic, ip , boost::proto::child_c<2>(a1)); nt2::container::table<type_t> tau; tie(x, tau, ip) = qr(r, nt2::raw_); extract_qr(x, tau, r, nt2::policy<ext::raw_>()); assign_swap(boost::proto::child_c<0>(a1), x); assign_swap(boost::proto::child_c<1>(a1), r); assign_swap(boost::proto::child_c<2>(a1), ip); }