diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-01-28 19:28:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 19:28:42 +0100 |
commit | 6992a234c6e474dbe95e446bd1cdc50bdb452414 (patch) | |
tree | 17abc9faf9e43147ee195b0dbe9259eb361b3a6d /vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java | |
parent | 140ed00756d8b45ee622fdd61d2df91dd133133a (diff) | |
parent | c824e1209fdd979612ccead027889eb6294b4652 (diff) |
Merge pull request #30084 from vespa-engine/bratseth/tensor-cleanupv8.294.50
Minor cleanup
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java b/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java index 047d8ee6ef0..14adcc8f18a 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java @@ -378,7 +378,7 @@ public class Join<NAMETYPE extends Name> extends PrimitiveTensorFunction<NAMETYP private static TensorAddress joinAddresses(TensorAddress a, int[] aToIndexes, TensorAddress b, int[] bToIndexes, TensorType joinedType) { int[] joinedLabels = new int[joinedType.dimensions().size()]; - Arrays.fill(joinedLabels, Tensor.INVALID_INDEX); + Arrays.fill(joinedLabels, Tensor.invalidIndex); mapContent(a, joinedLabels, aToIndexes); boolean compatible = mapContent(b, joinedLabels, bToIndexes); if ( ! compatible) return null; @@ -392,10 +392,10 @@ public class Join<NAMETYPE extends Name> extends PrimitiveTensorFunction<NAMETYP * occupied by a different value */ private static boolean mapContent(TensorAddress from, int[] to, int[] indexMap) { - for (int i = 0, sz = from.size(); i < sz; i++) { + for (int i = 0, size = from.size(); i < size; i++) { int toIndex = indexMap[i]; int label = Convert.safe2Int(from.numericLabel(i)); - if (to[toIndex] != Tensor.INVALID_INDEX && to[toIndex] != label) + if (to[toIndex] != Tensor.invalidIndex && to[toIndex] != label) return false; to[toIndex] = label; } |