aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/apps
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-10-13 14:11:28 +0000
committerArne Juul <arnej@verizonmedia.com>2020-10-15 08:18:59 +0000
commit08393e9e14635f1c6a6c84650c25023a0db7ed0b (patch)
tree48aae1605140fc6ff7d571084f345d33a3189c62 /searchlib/src/apps
parent61eaea251e8cacd320ac10754ffd1513d8638043 (diff)
handle both engine- and factory-based tensors
* use EngineOrFactory::get() instead of DefaultTensorEngine::ref() * avoid direct use of DenseTensorView etc where possible * use eval::Value instead of tensor::Tensor where possible
Diffstat (limited to 'searchlib/src/apps')
-rw-r--r--searchlib/src/apps/vespa-ranking-expression-analyzer/vespa-ranking-expression-analyzer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/apps/vespa-ranking-expression-analyzer/vespa-ranking-expression-analyzer.cpp b/searchlib/src/apps/vespa-ranking-expression-analyzer/vespa-ranking-expression-analyzer.cpp
index ae4b55948dc..51f243e1c37 100644
--- a/searchlib/src/apps/vespa-ranking-expression-analyzer/vespa-ranking-expression-analyzer.cpp
+++ b/searchlib/src/apps/vespa-ranking-expression-analyzer/vespa-ranking-expression-analyzer.cpp
@@ -9,6 +9,7 @@
#include <vespa/eval/eval/vm_forest.h>
#include <vespa/eval/eval/fast_forest.h>
#include <vespa/eval/eval/llvm/deinline_forest.h>
+#include <vespa/eval/eval/engine_or_factory.h>
#include <vespa/eval/tensor/default_tensor_engine.h>
#include <vespa/vespalib/io/mapped_file_input.h>
#include <vespa/eval/eval/param_usage.h>
@@ -17,7 +18,6 @@
//-----------------------------------------------------------------------------
using vespalib::BenchmarkTimer;
-using vespalib::tensor::DefaultTensorEngine;
using namespace vespalib::eval;
using namespace vespalib::eval::nodes;
using namespace vespalib::eval::gbdt;
@@ -154,7 +154,7 @@ struct FunctionInfo {
size_t get_path_len(const TreeList &trees) const {
size_t path = 0;
for (const Node *tree: trees) {
- InterpretedFunction ifun(DefaultTensorEngine::ref(), *tree, NodeTypes());
+ InterpretedFunction ifun(EngineOrFactory::get(), *tree, NodeTypes());
InterpretedFunction::Context ctx(ifun);
SimpleParams fun_params(params);
ifun.eval(ctx, fun_params);