New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1699 - Add a PacketMath version of the Error Function (erf).
Summary: Add a PacketMath version of the Error Function (erf).
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - vectorization (show other bugs)
Version: 3.4 (development)
Hardware: All All
: Normal Feature Request
Assignee: Rasmus Munk Larsen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-10 20:17 UTC by Pedro Gonnet
Modified: 2019-11-15 10:58 UTC (History)
6 users (show)



Attachments
Patch created with "hg export tip". (11.85 KB, patch)
2019-04-10 20:17 UTC, Pedro Gonnet
no flags Details | Diff

Description Pedro Gonnet 2019-04-10 20:17:41 UTC
Created attachment 936 [details]
Patch created with "hg export tip".

Add a PacketMath version of the Error Function (erf).

This is build along the same lines as the tanh implementation, added it in the same way in the same places. No idea if this is the right way to do it.

To make this work, I had to move the packet definition of erf from SpecialFunctionsPacketMath.h to GenericPacketMath.h, probably since the former is not included in the right places.

I've also added the default implementations of tanh and erf for float packets to the other architectures that seem able to support it and don't yet have a custom implementation.
Comment 1 Christoph Hertzberg 2019-04-11 08:15:58 UTC
Thanks for the patch. The implementation should go to:
 Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
(see how plog or psin/pcos are implemented).
And there should be some unit tests (in test/packetmath.cpp).

IMO, the EIGEN_FAST_MATH flag is a bit debatable at the moment (see Bug 1687).
Comment 2 Gael Guennebaud 2019-11-15 10:58:53 UTC
For the record, this has been included in changeset e36d6897ee5d

Note You need to log in before you can comment on or make changes to this bug.