pack<int> target;
pack<int> mask;
pack<int> value;
mask = target > value;
In file included from /netDISKS/master/netmt/LINUX_C65/cgi/boost-simd/3.1.0/boost-simd/include/boost/simd/sdk/simd/pack/generator.hpp:13:
/netDISKS/master/netmt/LINUX_C65/cgi/boost-simd/3.1.0/boost-simd/include/boost/simd/sdk/dsl/typed_expression.hpp:59:58: error:
no type named 'type' in 'boost::dispatch::meta::call<boost::proto::tagns_::tag::assign (boost::simd::native<int,
boost::simd::tag::sse_, void> &, const boost::simd::native<boost::simd::logical<int>, boost::simd::tag::sse_, void>
&), void>'
BOOST_PP_REPEAT_FROM_TO(1, BOOST_DISPATCH_MAX_ARITY, M0, ~)
<more errors follow>
if (a > b)
{
a = do_1 (a, b);
}
else
{
a = do_2 (a, b);
}
// my attempt is slow
pack<float> pa = load<pack<float>> (a+i);
pack<float> pb = load<pack<float>> (b+i);
store<pack<float>> (
if_else (pa > pb, do_1 (pa, pb), do_2 (pa, pb)),
a+i);
--
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.
For more options, visit https://groups.google.com/d/optout.
for (int32 i = 0; i < (1024*1024/8); i += simd::pack<float>::size ())
{
simd::pack<float> pa = simd::load<simd::pack<float>> (a+i);
simd::pack<float> pb = simd::load<simd::pack<float>> (b+i);
simd::store<simd::pack<float>> (
// 50% slower simd::if_else (pa > pb, (pa+pb)/(pa-pb), (pa+pb)/(pb-pa)), a+i);
// 12% slower simd::if_else (pa > pb, -pb, -pa), a+i);
}
You are compiling with -O3 right ?