Subject: Re: [boost] [math] Enable move semantics for polynomials
From: Lakshay Garg (lakshayg373_at_[hidden])
Date: 2017-08-14 08:12:26
On 14 August 2017 at 12:37, John Maddock via Boost <boost_at_[hidden]>
> On 13/08/2017 22:05, Robert Ramey via Boost wrote:
>> On 8/13/17 4:31 AM, Lakshay Garg via Boost wrote:
>>> Hello all
>>> The polynomial class in boost.math does not support move sematics. I
>>> to implement them and found that they immediately lead to significant
>>> improvements in performance (benchmarking using google-benchmark).
>>> I would like to get the changes merged into the main repository. I
>>> understand that boost accepts very high quality C++ code and since this
>>> will be my first time contributing to boost I am looking forward to
>>> assistance from other experienced contributors.
>>> Could someone please advise me on how to move forward and get the changes
>> Sounds worthwhile. While you're at it, how about considering making all
>> the functions constexpr ?
> constexpr support would require the underlying container (std::vector) to
> be constexpr as well, in fact since new (variable sized) storage is
> required, I don't see how that would be possible at all..... you could as
> someone suggested have a fixed storage polynomial class with multiplication
> yielding a different type... any non-trivial manipulation would lead to a
> complete explosion of template instantiations though.
âYes exactly. That is what I'm concerned about too. I'm not sure about
constexpr or fixed storage polynomials but I think having a class which
supports sparse polynomials (eg: 1 + x^4 + x^100) by using a linked list
would be useful. I would like to implement the functionality if I receive a
positive response. Comments are welcome.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk