|[eigen] cppduals - dual number implementation with Eigen specializations|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] cppduals - dual number implementation with Eigen specializations
- From: Michael Tesch <tesch1@xxxxxxxxx>
- Date: Tue, 3 Dec 2019 14:36:11 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HhXWpsED7rUXW0pabsXIOASK1FFP7TQe2NU9WUfyRj8=; b=SBUXYk+MddGVr6wf6cN0sDhKKTZWugS7Bx7ARhzwvYB2OtP6UfaED6KwKA5xrVTG8M qYW9xgsRxVIaF+rz7B6SMrrzqiipGtITFf/RTtaBFfw0q3NX0LCiL4cweYH7yvtrtm3Y lkJxfMvUARm3kn5A2M4ixakiQC6WreL3nUCIlMLIYbcZjde0mdtvGIJpyUSo/c+FnP/y KG1Z7AflUd6OmNo+jIn3uX6RiSU5Cib5TXklgaI2ong8h/GNIoDIyewvf+o3sIZEp9Mh Z9kRa3bRuhChkgI4JL14dmz7HA2b0m3UANotCZuf20w0ehlq/7QC9fILhiDV7kOPYGKO /wAg==
I've written (yet another!) Dual Number implementation for automatic differentiation. It is meant to be used as the value-type in Eigen matrices, and has templates for vectorization (shockingly) similar to (and based on) Eigen's complex-type vectorizations. It is quite fast for first-order forward diff, and imho pretty easy to use. There are also SSE/SSE3/AVX vectorizations for std::complex<dual< float | double >> types.
I hope this could be useful for someone and would be glad for any feedback, improvements, etc..
It would be interesting to compare this approach to others, by hand-wavey arguments I believe it should ultimately be faster in certain cases.