mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
static const class members turned into constexpr
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
2c0ef43b48
commit
64909b82bd
@@ -43,11 +43,11 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
typedef std::conditional_t<
|
||||
static_cast<int>(Layout) == static_cast<int>(ColMajor), RightArgType, LeftArgType> EvalRightArgType;
|
||||
|
||||
static const int LDims =
|
||||
static constexpr int LDims =
|
||||
internal::array_size<typename TensorEvaluator<EvalLeftArgType, Device>::Dimensions>::value;
|
||||
static const int RDims =
|
||||
static constexpr int RDims =
|
||||
internal::array_size<typename TensorEvaluator<EvalRightArgType, Device>::Dimensions>::value;
|
||||
static const int ContractDims = internal::array_size<Indices>::value;
|
||||
static constexpr int ContractDims = internal::array_size<Indices>::value;
|
||||
|
||||
typedef array<Index, LDims> left_dim_mapper_t;
|
||||
typedef array<Index, RDims> right_dim_mapper_t;
|
||||
@@ -56,7 +56,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
typedef array<Index, LDims - ContractDims> left_nocontract_t;
|
||||
typedef array<Index, RDims - ContractDims> right_nocontract_t;
|
||||
|
||||
static const int NumDims = LDims + RDims - 2 * ContractDims;
|
||||
static constexpr int NumDims = LDims + RDims - 2 * ContractDims;
|
||||
|
||||
typedef DSizes<Index, NumDims> Dimensions;
|
||||
|
||||
@@ -599,7 +599,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
// These variable are rolling over 3 consecutive k slices: first two we are
|
||||
// actively executing + one to track completion of kernels in the second
|
||||
// slice.
|
||||
static const Index P = 3;
|
||||
static constexpr Index P = 3;
|
||||
|
||||
// Handle to the allocated temporary storage for Lhs/Rhs blocks.
|
||||
BlockMemHandle packed_mem_;
|
||||
|
||||
Reference in New Issue
Block a user