mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
Fix clang compile when no MMA flags are set. Simplify MMA compiler detection.
This commit is contained in:
parent
f284c8592b
commit
6eebe97bab
@ -12,12 +12,21 @@
|
|||||||
|
|
||||||
#include "MatrixProductCommon.h"
|
#include "MatrixProductCommon.h"
|
||||||
|
|
||||||
#if __GNUC__ > 10 || __clang_major__ > 11 || \
|
#if EIGEN_COMP_LLVM
|
||||||
(__GNUC__ == 10 && (__GNUC_MINOR__ > 2 || \
|
#if !defined(EIGEN_ALTIVEC_DISABLE_MMA) && !defined(EIGEN_ALTIVEC_MMA_ONLY)
|
||||||
(__GNUC_MINOR__ == 2 && \
|
#ifdef __MMA__
|
||||||
__GNUC_PATCHLEVEL__ >= 1)))
|
#define EIGEN_ALTIVEC_MMA_ONLY
|
||||||
|
#else
|
||||||
|
#define EIGEN_ALTIVEC_DISABLE_MMA
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __has_builtin
|
||||||
|
#if __has_builtin(__builtin_mma_assemble_acc)
|
||||||
#define ALTIVEC_MMA_SUPPORT
|
#define ALTIVEC_MMA_SUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ALTIVEC_MMA_SUPPORT) && !defined(EIGEN_ALTIVEC_DISABLE_MMA)
|
#if defined(ALTIVEC_MMA_SUPPORT) && !defined(EIGEN_ALTIVEC_DISABLE_MMA)
|
||||||
#include "MatrixProductMMA.h"
|
#include "MatrixProductMMA.h"
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
|
|
||||||
#pragma GCC target("cpu=power10")
|
#pragma GCC target("cpu=power10")
|
||||||
|
|
||||||
|
#ifdef __has_builtin
|
||||||
#if !__has_builtin(__builtin_vsx_assemble_pair)
|
#if !__has_builtin(__builtin_vsx_assemble_pair)
|
||||||
#define __builtin_vsx_assemble_pair __builtin_mma_assemble_pair
|
#define __builtin_vsx_assemble_pair __builtin_mma_assemble_pair
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user