mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +08:00
Silenced some compilation warnings triggered by nvcc
This commit is contained in:
parent
2c73633b28
commit
0aaa5941df
@ -47,39 +47,39 @@ template<DenseIndex n, typename Index, std::size_t Rank> const Index array_get(c
|
|||||||
#if defined(EIGEN_HAS_CONSTEXPR)
|
#if defined(EIGEN_HAS_CONSTEXPR)
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_known_statically_impl<DimensionList<Index, Rank> > {
|
struct index_known_statically_impl<DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_known_statically_impl<const DimensionList<Index, Rank> > {
|
struct index_known_statically_impl<const DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct all_indices_known_statically_impl<DimensionList<Index, Rank> > {
|
struct all_indices_known_statically_impl<DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run() {
|
EIGEN_DEVICE_FUNC static constexpr bool run() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct all_indices_known_statically_impl<const DimensionList<Index, Rank> > {
|
struct all_indices_known_statically_impl<const DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run() {
|
EIGEN_DEVICE_FUNC static constexpr bool run() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct indices_statically_known_to_increase_impl<DimensionList<Index, Rank> > {
|
struct indices_statically_known_to_increase_impl<DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run() {
|
EIGEN_DEVICE_FUNC static constexpr bool run() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank> > {
|
struct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run() {
|
EIGEN_DEVICE_FUNC static constexpr bool run() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -92,14 +92,14 @@ struct index_statically_eq_impl<DimensionList<Index, Rank> > {
|
|||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_eq_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_eq_impl<const DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return i == value;
|
return i == value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_ne_impl<DimensionList<Index, Rank> > {
|
struct index_statically_ne_impl<DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return i != value;
|
return i != value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -112,26 +112,26 @@ struct index_statically_ne_impl<const DimensionList<Index, Rank> > {
|
|||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_gt_impl<DimensionList<Index, Rank> > {
|
struct index_statically_gt_impl<DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return i > value;
|
return i > value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_gt_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_gt_impl<const DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return i > value;
|
return i > value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_lt_impl<DimensionList<Index, Rank> > {
|
struct index_statically_lt_impl<DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return i < value;
|
return i < value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_lt_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_lt_impl<const DimensionList<Index, Rank> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return i < value;
|
return i < value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -139,26 +139,26 @@ struct index_statically_lt_impl<const DimensionList<Index, Rank> > {
|
|||||||
#else
|
#else
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_known_statically_impl<DimensionList<Index, Rank> > {
|
struct index_known_statically_impl<DimensionList<Index, Rank> > {
|
||||||
static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) {
|
EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_known_statically_impl<const DimensionList<Index, Rank> > {
|
struct index_known_statically_impl<const DimensionList<Index, Rank> > {
|
||||||
static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) {
|
EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct all_indices_known_statically_impl<DimensionList<Index, Rank> > {
|
struct all_indices_known_statically_impl<DimensionList<Index, Rank> > {
|
||||||
static EIGEN_ALWAYS_INLINE bool run() {
|
EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct all_indices_known_statically_impl<const DimensionList<Index, Rank> > {
|
struct all_indices_known_statically_impl<const DimensionList<Index, Rank> > {
|
||||||
static EIGEN_ALWAYS_INLINE bool run() {
|
EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -178,52 +178,52 @@ struct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank
|
|||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_eq_impl<DimensionList<Index, Rank> > {
|
struct index_statically_eq_impl<DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_eq_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_eq_impl<const DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_ne_impl<DimensionList<Index, Rank> > {
|
struct index_statically_ne_impl<DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() (const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_ne_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_ne_impl<const DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_gt_impl<DimensionList<Index, Rank> > {
|
struct index_statically_gt_impl<DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() (const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_gt_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_gt_impl<const DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_lt_impl<DimensionList<Index, Rank> > {
|
struct index_statically_lt_impl<DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() (const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Index, std::size_t Rank>
|
template <typename Index, std::size_t Rank>
|
||||||
struct index_statically_lt_impl<const DimensionList<Index, Rank> > {
|
struct index_statically_lt_impl<const DimensionList<Index, Rank> > {
|
||||||
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const {
|
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -314,10 +314,6 @@ struct index_known_statically_impl<const IndexList<FirstType, OtherTypes...> > {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool index_known_statically(const DenseIndex i) {
|
|
||||||
return index_known_statically_impl<T>::run(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct all_indices_known_statically_impl {
|
struct all_indices_known_statically_impl {
|
||||||
@ -340,10 +336,6 @@ struct all_indices_known_statically_impl<const IndexList<FirstType, OtherTypes..
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool all_indices_known_statically() {
|
|
||||||
return all_indices_known_statically_impl<T>::run();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct indices_statically_known_to_increase_impl {
|
struct indices_statically_known_to_increase_impl {
|
||||||
@ -366,22 +358,17 @@ template <typename FirstType, typename... OtherTypes>
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool indices_statically_known_to_increase() {
|
|
||||||
return indices_statically_known_to_increase_impl<T>::run();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <typename Tx>
|
template <typename Tx>
|
||||||
struct index_statically_eq_impl {
|
struct index_statically_eq_impl {
|
||||||
static constexpr bool run(DenseIndex, DenseIndex) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
||||||
}
|
}
|
||||||
@ -389,28 +376,23 @@ struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool index_statically_eq(DenseIndex i, DenseIndex value) {
|
|
||||||
return index_statically_eq_impl<T>::run(i, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct index_statically_ne_impl {
|
struct index_statically_ne_impl {
|
||||||
static constexpr bool run(DenseIndex, DenseIndex) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
||||||
}
|
}
|
||||||
@ -418,29 +400,23 @@ struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool index_statically_ne(DenseIndex i, DenseIndex value) {
|
|
||||||
return index_statically_ne_impl<T>::run(i, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct index_statically_gt_impl {
|
struct index_statically_gt_impl {
|
||||||
static constexpr bool run(DenseIndex, DenseIndex) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
||||||
}
|
}
|
||||||
@ -448,30 +424,24 @@ struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool index_statically_gt(DenseIndex i, DenseIndex value) {
|
|
||||||
return index_statically_gt_impl<T>::run(i, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct index_statically_lt_impl {
|
struct index_statically_lt_impl {
|
||||||
static constexpr bool run(DenseIndex, DenseIndex) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
||||||
}
|
}
|
||||||
@ -479,18 +449,12 @@ struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
|
|
||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr bool index_statically_lt(DenseIndex i, DenseIndex value) {
|
|
||||||
return index_statically_lt_impl<T>::run(i, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
|
||||||
@ -499,45 +463,100 @@ static constexpr bool index_statically_lt(DenseIndex i, DenseIndex value) {
|
|||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// No C++11 support
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool index_known_statically(DenseIndex) {
|
struct index_known_statically_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run(const DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool all_indices_known_statically() {
|
struct all_indices_known_statically_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool indices_statically_known_to_increase() {
|
struct indices_statically_known_to_increase_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool indices_statically_eq(DenseIndex, DenseIndex) {
|
struct index_statically_eq_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool indices_statically_ne(DenseIndex, DenseIndex) {
|
struct index_statically_ne_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool indices_statically_gt(DenseIndex, DenseIndex) {
|
struct index_statically_gt_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC bool indices_statically_lt(DenseIndex, DenseIndex) {
|
struct index_statically_lt_impl {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static bool run(DenseIndex, DenseIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
namespace Eigen {
|
||||||
|
namespace internal {
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_known_statically(DenseIndex i) {
|
||||||
|
return index_known_statically_impl<T>::run(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool all_indices_known_statically() {
|
||||||
|
return all_indices_known_statically_impl<T>::run();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool indices_statically_known_to_increase() {
|
||||||
|
return indices_statically_known_to_increase_impl<T>::run();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_eq(DenseIndex i, DenseIndex value) {
|
||||||
|
return index_statically_eq_impl<T>::run(i, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_ne(DenseIndex i, DenseIndex value) {
|
||||||
|
return index_statically_ne_impl<T>::run(i, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_gt(DenseIndex i, DenseIndex value) {
|
||||||
|
return index_statically_gt_impl<T>::run(i, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_lt(DenseIndex i, DenseIndex value) {
|
||||||
|
return index_statically_lt_impl<T>::run(i, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // end namespace internal
|
||||||
|
} // end namespace Eigen
|
||||||
|
|
||||||
|
|
||||||
#endif // EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
|
#endif // EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user