diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-11-27 17:55:01 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-11-27 17:55:01 +0200 |
commit | d3bb9e1b8f2b36688915fed559a1feac449216d7 (patch) | |
tree | 184df4eb34703bd0e2ff1ef7bdd8a593a555178e /vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java | |
parent | 9f1564bc8eb6568b54ed344a2c3201bfe634ac0e (diff) |
Pull name up
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java b/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java index 3c07dd9e6d4..b3c6fbc6862 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java @@ -2,7 +2,7 @@ package com.yahoo.tensor; import com.yahoo.tensor.evaluation.MapEvaluationContext; -import com.yahoo.tensor.evaluation.TypeContext; +import com.yahoo.tensor.evaluation.Name; import com.yahoo.tensor.evaluation.VariableTensor; import com.yahoo.tensor.functions.ConstantTensor; import com.yahoo.tensor.functions.Join; @@ -50,10 +50,10 @@ public class TensorFunctionBenchmark { private double dotProduct(Tensor tensor, List<Tensor> tensors) { double largest = Double.MIN_VALUE; - TensorFunction<TypeContext.Name> dotProductFunction = new Reduce<>(new Join<>(new ConstantTensor<>(tensor), - new VariableTensor<>("argument"), (a, b) -> a * b), - Reduce.Aggregator.sum).toPrimitive(); - MapEvaluationContext<TypeContext.Name> context = new MapEvaluationContext<>(); + TensorFunction<Name> dotProductFunction = new Reduce<>(new Join<>(new ConstantTensor<>(tensor), + new VariableTensor<>("argument"), (a, b) -> a * b), + Reduce.Aggregator.sum).toPrimitive(); + MapEvaluationContext<Name> context = new MapEvaluationContext<>(); for (Tensor tensorElement : tensors) { // tensors.size() = 1 for larger tensor context.put("argument", tensorElement); |