hi
p_t res2 = nt2::exp(res);
is all you need to write.
Regards
On 30/11/2015 03:45, Shengxi Duan wrote:
> Hi,
> I am new to NT2, Can you help me with this compiler error
>
> Thanks,
> Steve
>
>
> #include <boost/simd/sdk/simd/pack.hpp>
> #include <boost/simd/sdk/simd/io.hpp>
> #include <boost/simd/include/functions/splat.hpp>
> #include <boost/simd/include/functions/plus.hpp>
> #include <boost/simd/include/functions/multiplies.hpp>
> #include <nt2/include/functions/exp.hpp>
>
>
>
> int main()
> {
> using namespace nt2;
> using namespace boost::simd;
>
> typedef boost::simd::pack<float> p_t;
>
> p_t res;
> p_t u(10);
> p_t r = boost::simd::splat<p_t>(11);
>
> res = (u + r) * 2.f;
> p_t res2 = nt2::exp<p_t>(res); // <---- this line with compiler error
>
> }
>
>
> boost/simd/sdk/simd/pack/expression.hpp:54:7: required from ‘typename
> boost::disable_if<boost::is_base_of<boost::simd::expression<Expression,
> ResultType>, Xpr>, boost::simd::expression<Expression,
> ResultType>&>::type boost::simd::expression<Expression,
> ResultType>::operator=(const Xpr&) [with Xpr =
> boost::simd::expression<boost::proto::exprns_::expr<nt2::tag::exp_,
> boost::proto::argsns_::list1<boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
> boost::proto::argsns_::term<const boost::simd::native<float,
> boost::simd::tag::sse_, void>&>, 0l>, const boost::simd::native<float,
> boost::simd::tag::sse_, void>&> >, 1l>, boost::simd::native<float,
> boost::simd::tag::sse_, void> >; Expr =
> boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::simd::native<float,
> boost::simd::tag::sse_, void> >, 0l>; ResultType =
> boost::simd::native<float, boost::simd::tag::sse_, void>; typename
> boost::disable_if<boost::is_base_of<boost::simd::expression<Expression,
> ResultType>, Xpr>, boost::simd::expression<Expression,
> ResultType>&>::type =
> boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::simd::native<float,
> boost::simd::tag::sse_, void> >, 0l>, boost::simd::native<float,
> boost::simd::tag::sse_, void> >&]’
> /ctc/sw/v6/Vendor/boost_simd/linux64/3.1.0/include/boost/simd/sdk/simd/pack/pack.hpp:176:35:
> required from ‘boost::simd::pack<Type, Cardinal>::pack(const T&,
> typename T::proto_is_expr_*) [with T =
> boost::simd::expression<boost::proto::exprns_::expr<nt2::tag::exp_,
> boost::proto::argsns_::list1<boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
> boost::proto::argsns_::term<const boost::simd::native<float,
> boost::simd::tag::sse_, void>&>, 0l>, const boost::simd::native<float,
> boost::simd::tag::sse_, void>&> >, 1l>, boost::simd::native<float,
> boost::simd::tag::sse_, void> >; Type = float; long unsigned int
> Cardinal = 4ul; typename T::proto_is_expr_ = void]’
>
> --
> You received this message because you are subscribed to the Google
> Groups "nt2-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
nt2-dev+u...@googlegroups.com
> <mailto:
nt2-dev+u...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.