mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Fixed compilation errors with clang.
H: Enter commit message. Lines beginning with 'HG:' are removed.
This commit is contained in:
parent
ec785b0180
commit
1d3c8306f8
@ -30,7 +30,6 @@ struct traits<TensorBroadcastingOp<Broadcast, XprType> > : public traits<XprType
|
||||
typedef typename XprTraits::Index Index;
|
||||
typedef typename XprType::Nested Nested;
|
||||
typedef typename remove_reference<Nested>::type _Nested;
|
||||
static const int NumDimensions = XprTraits::NumDimensions;
|
||||
};
|
||||
|
||||
template<typename Broadcast, typename XprType>
|
||||
|
@ -848,8 +848,8 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
const Index kc = blocking.kc();
|
||||
const Index mc = (std::min)(m, blocking.mc());
|
||||
const Index nc = (std::min)(n, blocking.nc());
|
||||
int sizeA = mc * kc;
|
||||
int sizeB = kc * nc;
|
||||
const Index sizeA = mc * kc;
|
||||
const Index sizeB = kc * nc;
|
||||
|
||||
LhsScalar* blockA = static_cast<LhsScalar *>(this->m_device.allocate(sizeA * sizeof(LhsScalar)));
|
||||
RhsScalar* blockB = static_cast<RhsScalar *>(this->m_device.allocate(sizeB * sizeof(RhsScalar)));
|
||||
|
@ -37,7 +37,6 @@ struct traits<TensorImagePatchOp<Rows, Cols, XprType> > : public traits<XprType>
|
||||
typedef typename XprTraits::Index Index;
|
||||
typedef typename XprType::Nested Nested;
|
||||
typedef typename remove_reference<Nested>::type _Nested;
|
||||
static const int NumDimensions = XprTraits::NumDimensions + 1;
|
||||
};
|
||||
|
||||
template<DenseIndex Rows, DenseIndex Cols, typename XprType>
|
||||
|
@ -110,7 +110,7 @@ struct tuple_coeff<0> {
|
||||
update_value(std::get<0>(t), value);
|
||||
}
|
||||
template <typename... T>
|
||||
static constexpr bool value_known_statically(const DenseIndex i, const std::tuple<T...>& t) {
|
||||
static constexpr bool value_known_statically(const DenseIndex i, const std::tuple<T...>&) {
|
||||
// eigen_assert (i == 0); // gcc fails to compile assertions in constexpr
|
||||
return is_compile_time_constant<typename std::tuple_element<0, std::tuple<T...> >::type>::value & (i == 0);
|
||||
}
|
||||
@ -190,7 +190,7 @@ template <typename FirstType, typename... OtherTypes>
|
||||
struct index_statically_eq<IndexList<FirstType, OtherTypes...> > {
|
||||
constexpr bool operator() (const DenseIndex i, const DenseIndex value) const {
|
||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||
IndexList<FirstType, OtherTypes...>()[i] == value;
|
||||
(IndexList<FirstType, OtherTypes...>()[i] == value);
|
||||
}
|
||||
};
|
||||
|
||||
@ -198,7 +198,7 @@ template <typename FirstType, typename... OtherTypes>
|
||||
struct index_statically_eq<const IndexList<FirstType, OtherTypes...> > {
|
||||
constexpr bool operator() (const DenseIndex i, const DenseIndex value) const {
|
||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||
IndexList<FirstType, OtherTypes...>()[i] == value;
|
||||
(IndexList<FirstType, OtherTypes...>()[i] == value);
|
||||
}
|
||||
};
|
||||
|
||||
@ -213,7 +213,7 @@ template <typename FirstType, typename... OtherTypes>
|
||||
struct index_statically_ne<IndexList<FirstType, OtherTypes...> > {
|
||||
constexpr bool operator() (const DenseIndex i, const DenseIndex value) const {
|
||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||
IndexList<FirstType, OtherTypes...>()[i] != value;
|
||||
(IndexList<FirstType, OtherTypes...>()[i] != value);
|
||||
}
|
||||
};
|
||||
|
||||
@ -221,7 +221,7 @@ template <typename FirstType, typename... OtherTypes>
|
||||
struct index_statically_ne<const IndexList<FirstType, OtherTypes...> > {
|
||||
constexpr bool operator() (const DenseIndex i, const DenseIndex value) const {
|
||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||
IndexList<FirstType, OtherTypes...>()[i] != value;
|
||||
(IndexList<FirstType, OtherTypes...>()[i] != value);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user