mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-16 13:45:58 +08:00
Fix up PowerPC MMA flags so it builds by default.
(cherry picked from commit 591906477bc8c8102dbefceefe10d81648865394)
This commit is contained in:
parent
6973687c70
commit
17d57fb168
@ -17,8 +17,12 @@
|
|||||||
|
|
||||||
#include "MatrixProductCommon.h"
|
#include "MatrixProductCommon.h"
|
||||||
|
|
||||||
|
#if !defined(EIGEN_ALTIVEC_DISABLE_MMA)
|
||||||
|
#define EIGEN_ALTIVEC_DISABLE_MMA 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check for MMA builtin support.
|
// Check for MMA builtin support.
|
||||||
#if !defined(EIGEN_ALTIVEC_DISABLE_MMA) && defined(__has_builtin)
|
#if !EIGEN_ALTIVEC_DISABLE_MMA && defined(__has_builtin)
|
||||||
#if __has_builtin(__builtin_mma_assemble_acc)
|
#if __has_builtin(__builtin_mma_assemble_acc)
|
||||||
#define EIGEN_ALTIVEC_MMA_SUPPORT
|
#define EIGEN_ALTIVEC_MMA_SUPPORT
|
||||||
#endif
|
#endif
|
||||||
@ -27,12 +31,16 @@
|
|||||||
// Check if and how we should actually use MMA if supported.
|
// Check if and how we should actually use MMA if supported.
|
||||||
#if defined(EIGEN_ALTIVEC_MMA_SUPPORT)
|
#if defined(EIGEN_ALTIVEC_MMA_SUPPORT)
|
||||||
|
|
||||||
// Use MMA by default if available.
|
#if !defined(EIGEN_ALTIVEC_ENABLE_MMA_DYNAMIC_DISPATCH)
|
||||||
#if defined(__MMA__)
|
#define EIGEN_ALTIVEC_ENABLE_MMA_DYNAMIC_DISPATCH 0
|
||||||
#define EIGEN_ALTIVEC_MMA_ONLY 1
|
#endif
|
||||||
// Otherwise, check if we want to enable dynamic dispatch. Not supported by LLVM.
|
|
||||||
#elif defined(EIGEN_ALTIVEC_ENABLE_MMA_DYNAMIC_DISPATCH) && !defined(EIGEN_COMP_LLVM)
|
// Check if we want to enable dynamic dispatch. Not supported by LLVM.
|
||||||
|
#if EIGEN_ALTIVEC_ENABLE_MMA_DYNAMIC_DISPATCH && !EIGEN_COMP_LLVM
|
||||||
#define EIGEN_ALTIVEC_MMA_DYNAMIC_DISPATCH 1
|
#define EIGEN_ALTIVEC_MMA_DYNAMIC_DISPATCH 1
|
||||||
|
// Otherwise, use MMA by default if available.
|
||||||
|
#elif defined(__MMA__)
|
||||||
|
#define EIGEN_ALTIVEC_MMA_ONLY 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // EIGEN_ALTIVEC_MMA_SUPPORT
|
#endif // EIGEN_ALTIVEC_MMA_SUPPORT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user