mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 07:44:10 +08:00
Silenced a few more compilation warnings
This commit is contained in:
parent
590f4b0aa3
commit
f64045a060
@ -369,7 +369,7 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_> >
|
|||||||
|
|
||||||
void resize(const DSizes<Index, NumIndices>& dimensions) {
|
void resize(const DSizes<Index, NumIndices>& dimensions) {
|
||||||
array<Index, NumIndices> dims;
|
array<Index, NumIndices> dims;
|
||||||
for (int i = 0; i < NumIndices; ++i) {
|
for (std::size_t i = 0; i < NumIndices; ++i) {
|
||||||
dims[i] = dimensions[i];
|
dims[i] = dimensions[i];
|
||||||
}
|
}
|
||||||
resize(dims);
|
resize(dims);
|
||||||
|
@ -93,7 +93,7 @@ struct Sizes : internal::numeric_list<std::size_t, Indices...> {
|
|||||||
// todo: add assertion
|
// todo: add assertion
|
||||||
}
|
}
|
||||||
#ifdef EIGEN_HAS_VARIADIC_TEMPLATES
|
#ifdef EIGEN_HAS_VARIADIC_TEMPLATES
|
||||||
template <typename... DenseIndex> Sizes(DenseIndex... indices) { }
|
template <typename... DenseIndex> Sizes(DenseIndex...) { }
|
||||||
explicit Sizes(std::initializer_list<std::size_t> /*l*/) {
|
explicit Sizes(std::initializer_list<std::size_t> /*l*/) {
|
||||||
// todo: add assertion
|
// todo: add assertion
|
||||||
}
|
}
|
||||||
@ -333,7 +333,7 @@ static const size_t value = Sizes<Indices...>::count;
|
|||||||
template <typename std::size_t... Indices> struct array_size<Sizes<Indices...> > {
|
template <typename std::size_t... Indices> struct array_size<Sizes<Indices...> > {
|
||||||
static const size_t value = Sizes<Indices...>::count;
|
static const size_t value = Sizes<Indices...>::count;
|
||||||
};
|
};
|
||||||
template <std::size_t n, typename std::size_t... Indices> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::size_t array_get(const Sizes<Indices...>& a) {
|
template <std::size_t n, typename std::size_t... Indices> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::size_t array_get(const Sizes<Indices...>&) {
|
||||||
return get<n, internal::numeric_list<std::size_t, Indices...> >::value;
|
return get<n, internal::numeric_list<std::size_t, Indices...> >::value;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user