aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHaavard <havardpe@yahoo-inc.com>2016-10-05 14:50:32 +0000
committerHaavard <havardpe@yahoo-inc.com>2016-10-05 14:51:41 +0000
commit058833afc06b5cac2c9f81ab1c8b1c292cf8dac4 (patch)
tree0616e72d3b789ee7a3bd2bf97b71b29bc312a5f2 /searchlib
parentf6f8b776b5d6a4bda2376e5148114a60f33c87bd (diff)
make type information available to the interpreted program builder
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/apps/vespa-ranking-expression-analyzer/vespa-ranking-expression-analyzer.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/fef/test/as_tensor.cpp3
3 files changed, 4 insertions, 3 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 df3c99b21fc..42676c715d3 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
@@ -191,7 +191,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, params.size());
+ InterpretedFunction ifun(DefaultTensorEngine::ref(), *tree, params.size(), NodeTypes());
InterpretedFunction::Context ctx;
for (double param: params) {
ctx.add_param(param);
diff --git a/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp b/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp
index 6c90d6d4148..0f2f22b4ef3 100644
--- a/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp
@@ -172,7 +172,7 @@ RankingExpressionBlueprint::setup(const fef::IIndexEnvironment &env,
if (do_compile) {
_compile_token = CompileCache::compile(rank_function, PassParams::ARRAY);
} else {
- _interpreted_function.reset(new InterpretedFunction(DefaultTensorEngine::ref(), rank_function));
+ _interpreted_function.reset(new InterpretedFunction(DefaultTensorEngine::ref(), rank_function, node_types));
}
}
FeatureType output_type = do_compile
diff --git a/searchlib/src/vespa/searchlib/fef/test/as_tensor.cpp b/searchlib/src/vespa/searchlib/fef/test/as_tensor.cpp
index 4f604bb9f89..d9f23cb097f 100644
--- a/searchlib/src/vespa/searchlib/fef/test/as_tensor.cpp
+++ b/searchlib/src/vespa/searchlib/fef/test/as_tensor.cpp
@@ -9,6 +9,7 @@
#include <vespa/vespalib/eval/function.h>
#include <iostream>
+using vespalib::eval::NodeTypes;
using vespalib::eval::Function;
using vespalib::eval::ValueType;
using vespalib::tensor::DefaultTensorEngine;
@@ -19,7 +20,7 @@ namespace fef {
namespace test {
AsTensor::AsTensor(const vespalib::string &expr)
- : ifun(DefaultTensorEngine::ref(), Function::parse(expr)), ctx(), result(&ifun.eval(ctx))
+ : ifun(DefaultTensorEngine::ref(), Function::parse(expr), NodeTypes()), ctx(), result(&ifun.eval(ctx))
{
ASSERT_TRUE(result->is_tensor());
tensor = static_cast<const Tensor *>(result->as_tensor());