Hi all,
I am trying to use Boost.SIMD library and I am facing a main issue.
I have installed
Boost (and tested it) and the release-3.2 deposit on github. I have
implemented the dot product example and some others basic functions
(fused multiply-add,..) in order to evaluate the speed gain with
Boost.SIMD.
I tried with both Visual Studio 2012 and 2013.
My issue is that Visual Studio does not manage (with /arch:SSE2 build option) to interpret Boost.SIMD instructions as SIMD ones. In a same program, I have SSE2 instructions working good (_mm_store_ps() gives movaps) and Boost.SIMD instructions staying scalar when I look to the assembly generate code.
Strangely, this code works perfectly on Mac.
Have you ever be confronted with this issue? Can you suggest some processes or reflections to resolve it?
00CBBDFA lea ecx,[res]
00CBBDFD call boost::simd::pack<float,4>::pack<float,4> (0CB11E0h)
p_t u(10);
00CBBE02 mov dword ptr [ebp-178h],0Ah
00CBBE0C push 0
00CBBE0E lea eax,[ebp-178h]
00CBBE14 push eax
00CBBE15 lea ecx,[u]
00CBBE18 call boost::simd::pack<float,4>::pack<float,4><int> (0CB15DCh)
p_t r = boost::simd::splat<p_t>(11);
00CBBE1D mov dword ptr [ebp-16Ch],0Bh
00CBBE27 push 0
00CBBE29 lea eax,[ebp-16Ch]
00CBBE2F push eax
00CBBE30 lea ecx,[ebp-160h]
00CBBE36 push ecx
00CBBE37 call boost::simd::splat<boost::simd::pack<float,4>,int> (0CB1159h)
00CBBE3C add esp,8
00CBBE3F push eax
00CBBE40 lea ecx,[r]
00CBBE43 call boost::simd::pack<float,4>::pack<float,4><boost::simd::expression<boost::proto::exprns_::expr<boost::simd::tag::splat_,boost::proto::argsns_::list2<boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<int>,0>,int>,boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<boost::dispatch::meta::as_<boost::simd::native<float,boost::simd::tag::sse_,void> > >,0>,boost::dispatch::meta::as_<boost::simd::native<float,boost::simd::tag::sse_,void> > > >,2>,boost::simd::native<float,boost::simd::tag::sse_,void> > > (0CB10A5h)
res = (u + r) * 2.f;
00CBBE48 movss xmm0,dword ptr ds:[0CC3B84h]
00CBBE50 movss dword ptr [ebp-150h],xmm0
00CBBE58 lea eax,[ebp-150h]
00CBBE5E push eax
00CBBE5F lea ecx,[r]
00CBBE62 push ecx
00CBBE63 lea edx,[u]
00CBBE66 push edx
00CBBE67 lea eax,[ebp-144h]
00CBBE6D push eax
00CBBE6E call boost::simd::operator+<boost::simd::pack<float,4>,boost::simd::pack<float,4> > (0CB17EEh)
00CBBE73 add esp,0Ch
00CBBE76 push eax
00CBBE77 lea ecx,[ebp-134h]
00CBBE7D push ecx
00CBBE7E call boost::simd::operator*<boost::simd::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::plus,boost::proto::argsns_::list2<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> const &>,0>,boost::simd::native<float,boost::simd::tag::sse_,void> const &>,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> const &>,0>,boost::simd::native<float,boost::simd::tag::sse_,void> const &> >,2>,boost::simd::native<float,boost::simd::tag::sse_,void> >,float> (0CB174Eh)
00CBBE83 add esp,0Ch
00CBBE86 push eax
00CBBE87 lea ecx,[res]
00CBBE8A call boost::simd::pack<float,4>::operator=<boost::simd::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::multiplies,boost::proto::argsns_::list2<boost::simd::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::plus,boost::proto::argsns_::list2<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> const &>,0>,boost::simd::native<float,boost::simd::tag::sse_,void> const &>,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> const &>,0>,boost::simd::native<float,boost::simd::tag::sse_,void> const &> >,2>,boost::simd::native<float,boost::simd::tag::sse_,void> >,boost::simd::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<float>,0>,float> >,2>,boost::simd::native<float,b... (0CB16EFh)
Did you turned optimisation on ?
--
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.
Yes SSE2 is on.
I was speaking of O3
Indeed
--
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+unsubscribe@googlegroups.com.