|
Boost : |
Subject: Re: [boost] [xint] Boost.XInt formal review
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2011-03-03 13:54:13
On 03/03/11 19:34, Jeremy Maitin-Shepard wrote:
> This whole explicitly passing simd<T> in place of T, which seems to be
> the same thing done in nt2, in order to make use of certain
> optimizations seems like a poor interface choice. In almost all
> cases, the user logically cares about a container of T, and wants to
> work with individual elements, and the library should ensure that SIMD
> operations are used whenever possible. In particular, the design of
> the Eigen library, at least in this respect, seems more appropriate.
> Perhaps I am just misinterpreting the intended semantics of using
> simd<T>, but if it in fact it results in the logical value_type still
> being T, then the question is why you would even need to specify simd
> at all, rather than having it always be used. I also don't see how
> the optimization can be externalized in the (quite common) case of
> doing more than element-wise operations.
Oh and morevoer, even with the pack interface we have a simd::range
adaptor so
std::vector<T> foo(100);
transform(simd::range(v), _1 + 3)
do the transform using pack internally.
Again no need for user care of SIMDization.
Bear with me the current lack of doc on this subject.
and w/r to eigen, they have the very same low level component of SIMD pack.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk