[Patch] Fix adjacent_difference in parallel-mode

Paolo Carlini paolo.carlini@oracle.com
Tue Oct 13 12:37:00 GMT 2009


Johannes Singler wrote:
> I have looked into it, and consider it fine.
>
> __transform2_selector takes an _IteratorTriple, which is a custom type,
> so I have uglified _M_first, _M_second, _M_third.  __transform1_selector
> takes a std::pair of iterators, so there was no need to uglify first and
> second.
>   
Ok, thanks. Maybe a comment is in order...

Can you please uglify __inner_product_selector::begin2_iterator? Also,
while you are modifying this file, I would suggest changing:

        if (__comp(*__x, *__y))
          return __y;
        else
          return __x;

to simply:

        return __comp(*__x, *__y) ? __y : __x;

and

    struct __adjacent_difference_selector :
           public __generic_for_each_selector<_It>

to

    struct __adjacent_difference_selector
    : public __generic_for_each_selector<_It>

Thanks in advance!
Paolo.



More information about the Libstdc++ mailing list