private static void addDimension(TensorType.Builder builder, String name, TensorType.Dimension.Type type, int size) {
        switch (type) {
            case mapped: builder.mapped(name); break;
            case indexedUnbound: builder.indexed(name); break;
            case indexedBound: builder.indexed(name, size); break;
            default: throw new IllegalArgumentException("Dimension type " + type + " not supported");
        }
    }
Microbenchmark of a "dot product" of two mapped rank 2 tensors

@author bratseth
vespajlib/src/test/java/com/yahoo/tensor/MatrixDotProductBenchmark.java