Re: [nt2-dev] boost::simd:load from non-contiguous memory

51 views
Skip to first unread message
Message has been deleted

Joel FALCOU

unread,
Mar 15, 2016, 4:31:35 PM3/15/16
to nt2...@googlegroups.com
It should be possible yes, we'll look at why it fails.

On 15/03/2016 21:27, Steve wrote:
> Hi,
> Is it possible to do this?
>
> typedef boost::simd::pack<double> p_t;
> typedef boost::simd::pack<size_t> p_i;
>
> double v[] = {.1, .2, .3, .4};
> p_i i(0,2);
> boost::simd::load<p_t> (&v[0], i); // <=== compiler error below
>
> I got compiler error
>
>
> nt2/linux64/3.1.0/include/boost/simd/memory/functions/load.hpp: In
> instantiation of ‘Type boost::simd::load(const Pointer&, const Offset&)
> [with Type = boost::simd::pack<double>; Pointer = double*; Offset =
> boost::simd::pack<long unsigned int>]’:
> nt2_4.cpp:30:22: required from here
> nt2/linux64/3.1.0/include/boost/simd/memory/functions/load.hpp:67:64:
> error: no match for call to
> ‘(boost::dispatch::meta::dispatch_call<boost::simd::tag::load_(double*
> const&, boost::dispatch::meta::as_<boost::simd::pack<double> >, const
> boost::simd::pack<long unsigned int>&), void>::type {aka
> boost::dispatch::meta::implement<boost::dispatch::tag::unknown_,
> boost::dispatch::tag::formal_, boost::dispatch::tag::formal_(double*,
> boost::dispatch::meta::as_<boost::simd::pack<double> >,
> boost::simd::pack<long unsigned int>)>}) (double* const&,
> boost::dispatch::meta::as_<boost::simd::pack<double> >, const
> boost::simd::pack<long unsigned int>&)’
> return callee(ptr,boost::dispatch::meta::as_<Type>(),offset);
>
> Thanks,
> Steve
>
> --
> 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.
Message has been deleted

Joel FALCOU

unread,
Mar 16, 2016, 6:05:53 PM3/16/16
to nt2...@googlegroups.com
Your code snippet compiles and executes on current master. Here's the
complete code :


#include <boost/simd/include/pack.hpp>
#include <boost/simd/include/functions/load.hpp>
#include <iostream>

int main()
{
typedef boost::simd::pack<double> p_t;
typedef boost::simd::pack<size_t> p_i;

double v[] = {.1, .2, .3, .4};
p_i i(0,2);
auto p = boost::simd::load<p_t> (&v[0], i); // <=== compiler error
below

std::cout << i << "\n";
std::cout << p << "\n";
}


compiled using

g++ test.cpp -o test.exe -O3 -msse2 -I$NT2_INCLUDE -I$BOOST_ROOT
-fno-strict-aliasing -DBOOST_SIMD_NO_STRICT_ALIASING -std=c++11

g++ 4.9.0-7 Debian

Are you using an older release ?

On 16/03/2016 22:00, Steve wrote:
> Joel,
> Is there any update to this issue?
> Thanks,
> Steve
> > an email to nt2-dev+u...@googlegroups.com <javascript:>
> > <mailto:nt2-dev+u...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
Message has been deleted

Steve

unread,
Jun 15, 2016, 9:12:52 PM6/15/16
to nt2-dev
Joel,
I downloaded the latest boost::simd and still got the same error. What version of boost library and NL2 library did you use when you successfully compiled.

Thanks,
Steve

Joel FALCOU

unread,
Jun 16, 2016, 2:33:10 PM6/16/16
to nt2...@googlegroups.com
It was latest master commit from NT2 with boost 1.58.

Steve

unread,
Jun 16, 2016, 3:18:04 PM6/16/16
to nt2-dev
Ok, that worked. Thanks.

Joel FALCOU

unread,
Jun 16, 2016, 3:19:09 PM6/16/16
to nt2...@googlegroups.com
FYI, Boost.SIMD is finalizing it's separation from NT2.
It'll be "soonishlingly" available on github.com/NumScale/boost.simd
Still not complete yet though.
Reply all
Reply to author
Forward
0 new messages