This bugzilla service is closed. All entries have been migrated to
Bug 976 - Code duplication in Core/arch/*/MathFunctions.h
Summary: Code duplication in Core/arch/*/MathFunctions.h
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - vectorization (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Internal Design
Assignee: Nobody
Depends on: 692
  Show dependency treegraph
Reported: 2015-03-03 18:16 UTC by Christoph Hertzberg
Modified: 2019-12-04 14:21 UTC (History)
4 users (show)


Description Christoph Hertzberg 2015-03-03 18:16:34 UTC
There is a lot of code duplication in the vectorized MathFunctions.
Partially, functions are identical except for different variable types and method names, partially functions have slight differences.
Partially, some functions are implemented for some platforms but not for others (AltiVec has no MathFunctions at all).
This is also the case for the unsupported MoreVectorization module (only one function and only for SSE at the moment).

With meta-packets all implementations can be joined into a single generic implementation, which increases maintainability a lot and avoids having to fix possible issues for multiple platforms.
Important for this is that all low-level function calls are replaces by the corresponding p* functions from arch/*/PacketMath.h 
We probably need to introduce further p* functions for that which can be optimized for different architectures.

If this works, we probably don't even need the {HasSin, HasCos, HasLog, ...}-flags in packet_traits anymore.
Comment 1 Nobody 2019-12-04 14:21:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

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