private static long computeSize(DimensionSizes sizes, List<Integer> iterateDimensions) {
            long size = 1;
            for (int i = 0; i < iterateDimensions.size(); i++)
                size *= sizes.size(iterateDimensions.get(i));
            return size;
        }
Since the right dimensions binds closest, iteration order is the opposite of the tensor order
vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java