|Re: [eigen] cppduals - dual number implementation with Eigen specializations|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] cppduals - dual number implementation with Eigen specializations
- From: Ian Bell <ian.h.bell@xxxxxxxxx>
- Date: Tue, 3 Dec 2019 10:03:26 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=RWjYXQGUYgFF7glQ/ehrQLV5oEFHmwecF7NTGOiSRBw=; b=sba977IR6PVGs39lVuPsWsgV6L08VVt/ODhwKRH23XTc1TAXOH2laW5tWNUWhI/sQE HH0wo8ZW6p+KfAmvMqaH9e8XaMVpS/nDswywCcCPfTy9w2QU6FeBT5Wf9pLyu6q3cbEU /5d6eU93E2Tr5iaJFoXFoVpy9DnbS5bB+/kxuGv1b0g0EQ4jpVAFVggXsaBHeD0h2B/g PhLaBbAWSUxI8Lslnbe5Q7Qcb33a3HJ3fURKuEpzryjPJHunEG5HbPlrBWBQTktpAoDk DNk9XxVZb1X2ESxGlO6wHHXfn3u2bMGpYwsqGR3NbH0EO8LT65O270WmaWJ3DdKr7udp /evA==
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.