diff options
author | Jon Bratseth <bratseth@vespa.ai> | 2024-01-28 18:38:47 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@vespa.ai> | 2024-01-28 18:38:47 +0100 |
commit | c824e1209fdd979612ccead027889eb6294b4652 (patch) | |
tree | 17abc9faf9e43147ee195b0dbe9259eb361b3a6d /vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java | |
parent | 140ed00756d8b45ee622fdd61d2df91dd133133a (diff) |
Minor cleanup
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java b/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java index a428524612b..fc0473c635a 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java @@ -172,7 +172,7 @@ public abstract class IndexedTensor implements Tensor { static long toValueIndex(TensorAddress address, DimensionSizes sizes, TensorType type) { long valueIndex = 0; - for (int i = 0, sz = address.size(); i < sz; i++) { + for (int i = 0, size = address.size(); i < size; i++) { long label = address.numericLabel(i); if (label >= sizes.size(i)) throw new IllegalArgumentException(address + " is not within the bounds of " + type); @@ -1058,7 +1058,7 @@ public abstract class IndexedTensor implements Tensor { /** In this case we can reuse the source index computation for the iteration index */ private final static class EqualSizeMultiDimensionIndexes extends MultiDimensionIndexes { - private long lastComputedSourceValueIndex = Tensor.INVALID_INDEX; + private long lastComputedSourceValueIndex = Tensor.invalidIndex; private EqualSizeMultiDimensionIndexes(DimensionSizes sizes, List<Integer> iterateDimensions, long[] initialIndexes, long size) { super(sizes, sizes, iterateDimensions, initialIndexes, size); |