Re: broken coordinate_matrix::sort with gcc 4.7
Gunter Winkler <[email protected]>
| Newsgroups | gmane.comp.lib.boost.ublas |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Am Tuesday 11 September 2012 schrieb Ungermann, Jörn:
> Hi all,
>
> we created a simple version of inplace_merge, which can be added as
> method to coordinate_matrix. It is not intensely tested, something
> we would do via Testcases in case we proceed in this direction (I do
> not fully trust my lower_bound for all border cases; it also seems
> to use to man LoC). However, using this in our numerical code, all
> of our application testcases pass.
>
> array_size_type lower_bound(array_size_type beg,
> array_size_type end, array_size_type target) const {
> while (end > beg + 1) {
> ....
> inplace_merge(new_mid, rig_mid, end);
> }
>
> And the std::inplace_merge call in sort needs to be replaced by
>
> inplace_merge(0, sorted_filled_, filled_);
>
> Similar code would be needed for the sparse vector. If desired, I can
> provide patches and associated testcases. The performance of this is
> indistinguishable from the STL internal buffer-less algorithm.
>
I'd vote for this solution because we know for sure that the
index_triple_iterator cannot be used with a temporary buffer. Thus using
a custom inplace_merge relying on working std algotrithms seems to be a
robust solution.
Please attach patches to https://svn.boost.org/trac/boost/ticket/7363 so
we can track the related changes.
mfg
Gunter
_______________________________________________
ublas mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [email protected]
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAlBSR4YACgkQghsXb/J0PcG7XACgu0HC9xoo/B0ILDRK9WEfccgT VCUAnAuPT/b6R/w5B2rYtm4BlI3w3Egz =eLWG -----END PGP SIGNATURE-----