mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Silenced a warning in the tensor code
This commit is contained in:
parent
3220eb2b93
commit
70bc3b0668
@ -295,7 +295,7 @@ template<typename PlainObjectType> class TensorRef : public TensorBase<TensorRef
|
|||||||
Index index = 0;
|
Index index = 0;
|
||||||
if (PlainObjectType::Options & RowMajor) {
|
if (PlainObjectType::Options & RowMajor) {
|
||||||
index += indices[0];
|
index += indices[0];
|
||||||
for (int i = 1; i < NumIndices; ++i) {
|
for (size_t i = 1; i < NumIndices; ++i) {
|
||||||
index = index * dims[i] + indices[i];
|
index = index * dims[i] + indices[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -313,7 +313,7 @@ template<typename PlainObjectType> class TensorRef : public TensorBase<TensorRef
|
|||||||
Index index = 0;
|
Index index = 0;
|
||||||
if (PlainObjectType::Options & RowMajor) {
|
if (PlainObjectType::Options & RowMajor) {
|
||||||
index += indices[0];
|
index += indices[0];
|
||||||
for (int i = 1; i < NumIndices; ++i) {
|
for (size_t i = 1; i < NumIndices; ++i) {
|
||||||
index = index * dims[i] + indices[i];
|
index = index * dims[i] + indices[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user