aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/vespa/eval/instruction
diff options
context:
space:
mode:
Diffstat (limited to 'eval/src/vespa/eval/instruction')
-rw-r--r--eval/src/vespa/eval/instruction/best_similarity_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/best_similarity_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_cell_range_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/dense_cell_range_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_dot_product_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/dense_dot_product_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_hamming_distance.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/dense_hamming_distance.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_lambda_peek_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/dense_lambda_peek_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_matmul_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/dense_matmul_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_multi_matmul_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/dense_multi_matmul_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_simple_expand_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/dense_simple_expand_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/dense_single_reduce_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_tensor_create_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/dense_tensor_create_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_tensor_peek_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/dense_tensor_peek_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/dense_xw_product_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/dense_xw_product_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/generic_lambda.cpp9
-rw-r--r--eval/src/vespa/eval/instruction/generic_lambda.h3
-rw-r--r--eval/src/vespa/eval/instruction/generic_map_subspaces.cpp9
-rw-r--r--eval/src/vespa/eval/instruction/generic_map_subspaces.h3
-rw-r--r--eval/src/vespa/eval/instruction/inplace_map_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/inplace_map_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/join_with_number_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/join_with_number_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/l2_distance.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/l2_distance.h2
-rw-r--r--eval/src/vespa/eval/instruction/mapped_lookup.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/mapped_lookup.h2
-rw-r--r--eval/src/vespa/eval/instruction/mixed_112_dot_product.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/mixed_112_dot_product.h2
-rw-r--r--eval/src/vespa/eval/instruction/mixed_inner_product_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/mixed_inner_product_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/mixed_l2_distance.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/mixed_l2_distance.h2
-rw-r--r--eval/src/vespa/eval/instruction/mixed_simple_join_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/mixed_simple_join_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/replace_type_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/replace_type_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/simple_join_count.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/simple_join_count.h2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_112_dot_product.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_112_dot_product.h2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_dot_product_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_dot_product_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_merge_function.cpp8
-rw-r--r--eval/src/vespa/eval/instruction/sparse_merge_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp8
-rw-r--r--eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_singledim_lookup.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/sparse_singledim_lookup.h2
-rw-r--r--eval/src/vespa/eval/instruction/sum_max_dot_product_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/sum_max_dot_product_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/universal_dot_product.cpp4
-rw-r--r--eval/src/vespa/eval/instruction/universal_dot_product.h2
-rw-r--r--eval/src/vespa/eval/instruction/unpack_bits_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/unpack_bits_function.h2
-rw-r--r--eval/src/vespa/eval/instruction/vector_from_doubles_function.cpp2
-rw-r--r--eval/src/vespa/eval/instruction/vector_from_doubles_function.h2
68 files changed, 96 insertions, 92 deletions
diff --git a/eval/src/vespa/eval/instruction/best_similarity_function.cpp b/eval/src/vespa/eval/instruction/best_similarity_function.cpp
index b3a229c946c..3bdb7e8e907 100644
--- a/eval/src/vespa/eval/instruction/best_similarity_function.cpp
+++ b/eval/src/vespa/eval/instruction/best_similarity_function.cpp
@@ -189,9 +189,9 @@ BestSimilarityFunction::BestSimilarityFunction(const ValueType &res_type_in,
}
InterpretedFunction::Instruction
-BestSimilarityFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+BestSimilarityFunction::compile_self(const CTFContext &ctx) const
{
- return InterpretedFunction::Instruction(_my_fun, make_param(stash));
+ return InterpretedFunction::Instruction(_my_fun, make_param(ctx.stash));
}
const TensorFunction &
diff --git a/eval/src/vespa/eval/instruction/best_similarity_function.h b/eval/src/vespa/eval/instruction/best_similarity_function.h
index 008feca62ae..f0b753a52a9 100644
--- a/eval/src/vespa/eval/instruction/best_similarity_function.h
+++ b/eval/src/vespa/eval/instruction/best_similarity_function.h
@@ -30,7 +30,7 @@ public:
const TensorFunction &sec,
InterpretedFunction::op_function my_fun,
size_t inner_size);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_cell_range_function.cpp b/eval/src/vespa/eval/instruction/dense_cell_range_function.cpp
index d60504dddce..c3a7c4a244a 100644
--- a/eval/src/vespa/eval/instruction/dense_cell_range_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_cell_range_function.cpp
@@ -37,7 +37,7 @@ DenseCellRangeFunction::DenseCellRangeFunction(const ValueType &result_type,
DenseCellRangeFunction::~DenseCellRangeFunction() = default;
InterpretedFunction::Instruction
-DenseCellRangeFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+DenseCellRangeFunction::compile_self(const CTFContext &) const
{
assert(result_type().cell_type() == child().result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/dense_cell_range_function.h b/eval/src/vespa/eval/instruction/dense_cell_range_function.h
index a37e60d2e57..f132a6f7fb7 100644
--- a/eval/src/vespa/eval/instruction/dense_cell_range_function.h
+++ b/eval/src/vespa/eval/instruction/dense_cell_range_function.h
@@ -24,7 +24,7 @@ public:
~DenseCellRangeFunction() override;
size_t offset() const { return _offset; }
size_t length() const { return _length; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return child().result_is_mutable(); }
};
diff --git a/eval/src/vespa/eval/instruction/dense_dot_product_function.cpp b/eval/src/vespa/eval/instruction/dense_dot_product_function.cpp
index 8395ef66117..bee7f42bd48 100644
--- a/eval/src/vespa/eval/instruction/dense_dot_product_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_dot_product_function.cpp
@@ -33,7 +33,7 @@ DenseDotProductFunction::DenseDotProductFunction(const TensorFunction &lhs_in,
}
InterpretedFunction::Instruction
-DenseDotProductFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+DenseDotProductFunction::compile_self(const CTFContext &) const
{
auto op = typify_invoke<2,TypifyCellType,MyDotProductOp>(lhs().result_type().cell_type(),
rhs().result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/dense_dot_product_function.h b/eval/src/vespa/eval/instruction/dense_dot_product_function.h
index 51fdbc3f685..db09db85147 100644
--- a/eval/src/vespa/eval/instruction/dense_dot_product_function.h
+++ b/eval/src/vespa/eval/instruction/dense_dot_product_function.h
@@ -14,7 +14,7 @@ class DenseDotProductFunction : public tensor_function::Op2
public:
DenseDotProductFunction(const TensorFunction &lhs_in,
const TensorFunction &rhs_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static bool compatible_types(const ValueType &res, const ValueType &lhs, const ValueType &rhs);
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/dense_hamming_distance.cpp b/eval/src/vespa/eval/instruction/dense_hamming_distance.cpp
index 81f25241d3d..af3551466de 100644
--- a/eval/src/vespa/eval/instruction/dense_hamming_distance.cpp
+++ b/eval/src/vespa/eval/instruction/dense_hamming_distance.cpp
@@ -41,7 +41,7 @@ DenseHammingDistance::DenseHammingDistance(const TensorFunction &lhs_child,
}
InterpretedFunction::Instruction
-DenseHammingDistance::compile_self(const ValueBuilderFactory &, Stash &) const
+DenseHammingDistance::compile_self(const CTFContext &) const
{
auto op = int8_hamming_to_double_op;
const auto &lhs_type = lhs().result_type();
diff --git a/eval/src/vespa/eval/instruction/dense_hamming_distance.h b/eval/src/vespa/eval/instruction/dense_hamming_distance.h
index 437c50bc52b..7dac0e0352e 100644
--- a/eval/src/vespa/eval/instruction/dense_hamming_distance.h
+++ b/eval/src/vespa/eval/instruction/dense_hamming_distance.h
@@ -14,7 +14,7 @@ class DenseHammingDistance : public tensor_function::Op2
public:
DenseHammingDistance(const TensorFunction &lhs_child,
const TensorFunction &rhs_child);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_lambda_peek_function.cpp b/eval/src/vespa/eval/instruction/dense_lambda_peek_function.cpp
index b0e0a9af648..50b95ded7ce 100644
--- a/eval/src/vespa/eval/instruction/dense_lambda_peek_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_lambda_peek_function.cpp
@@ -52,9 +52,9 @@ DenseLambdaPeekFunction::DenseLambdaPeekFunction(const ValueType &result_type,
DenseLambdaPeekFunction::~DenseLambdaPeekFunction() = default;
InterpretedFunction::Instruction
-DenseLambdaPeekFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+DenseLambdaPeekFunction::compile_self(const CTFContext &ctx) const
{
- const Self &self = stash.create<Self>(result_type(), *_idx_fun);
+ const Self &self = ctx.stash.create<Self>(result_type(), *_idx_fun);
using MyTypify = TypifyCellType;
auto op = typify_invoke<2,MyTypify,MyLambdaPeekOp>(result_type().cell_type(), child().result_type().cell_type());
assert(child().result_type().is_dense());
diff --git a/eval/src/vespa/eval/instruction/dense_lambda_peek_function.h b/eval/src/vespa/eval/instruction/dense_lambda_peek_function.h
index 16e3298feff..7c1ca08a661 100644
--- a/eval/src/vespa/eval/instruction/dense_lambda_peek_function.h
+++ b/eval/src/vespa/eval/instruction/dense_lambda_peek_function.h
@@ -23,7 +23,7 @@ public:
const TensorFunction &child,
std::shared_ptr<Function const> idx_fun);
~DenseLambdaPeekFunction() override;
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
vespalib::string idx_fun_dump() const;
bool result_is_mutable() const override { return true; }
};
diff --git a/eval/src/vespa/eval/instruction/dense_matmul_function.cpp b/eval/src/vespa/eval/instruction/dense_matmul_function.cpp
index e18ffabec69..9691d3a11a9 100644
--- a/eval/src/vespa/eval/instruction/dense_matmul_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_matmul_function.cpp
@@ -163,10 +163,10 @@ DenseMatMulFunction::DenseMatMulFunction(const ValueType &result_type,
DenseMatMulFunction::~DenseMatMulFunction() = default;
InterpretedFunction::Instruction
-DenseMatMulFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+DenseMatMulFunction::compile_self(const CTFContext &ctx) const
{
using MyTypify = TypifyValue<TypifyCellMeta,TypifyBool>;
- Self &self = stash.create<Self>(result_type(), _lhs_size, _common_size, _rhs_size);
+ Self &self = ctx.stash.create<Self>(result_type(), _lhs_size, _common_size, _rhs_size);
auto op = typify_invoke<4,MyTypify,SelectDenseMatmul>(
lhs().result_type().cell_meta().not_scalar(),
rhs().result_type().cell_meta().not_scalar(),
diff --git a/eval/src/vespa/eval/instruction/dense_matmul_function.h b/eval/src/vespa/eval/instruction/dense_matmul_function.h
index 8e4ff5f14a9..34bf385bf67 100644
--- a/eval/src/vespa/eval/instruction/dense_matmul_function.h
+++ b/eval/src/vespa/eval/instruction/dense_matmul_function.h
@@ -49,7 +49,7 @@ public:
bool lhs_common_inner() const { return _lhs_common_inner; }
bool rhs_common_inner() const { return _rhs_common_inner; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
void visit_self(vespalib::ObjectVisitor &visitor) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_multi_matmul_function.cpp b/eval/src/vespa/eval/instruction/dense_multi_matmul_function.cpp
index d9205488dff..90f91e109cc 100644
--- a/eval/src/vespa/eval/instruction/dense_multi_matmul_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_multi_matmul_function.cpp
@@ -176,7 +176,7 @@ DenseMultiMatMulFunction::DenseMultiMatMulFunction(const ValueType &result_type,
DenseMultiMatMulFunction::~DenseMultiMatMulFunction() = default;
InterpretedFunction::Instruction
-DenseMultiMatMulFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+DenseMultiMatMulFunction::compile_self(const CTFContext &) const
{
auto op = my_select(lhs().result_type().cell_type());
return InterpretedFunction::Instruction(op, wrap_param<DenseMultiMatMulFunction>(*this));
diff --git a/eval/src/vespa/eval/instruction/dense_multi_matmul_function.h b/eval/src/vespa/eval/instruction/dense_multi_matmul_function.h
index a6a1da67bb2..9aeb458270e 100644
--- a/eval/src/vespa/eval/instruction/dense_multi_matmul_function.h
+++ b/eval/src/vespa/eval/instruction/dense_multi_matmul_function.h
@@ -43,7 +43,7 @@ public:
bool lhs_common_inner() const { return _lhs_common_inner; }
bool rhs_common_inner() const { return _rhs_common_inner; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
void visit_self(vespalib::ObjectVisitor &visitor) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_simple_expand_function.cpp b/eval/src/vespa/eval/instruction/dense_simple_expand_function.cpp
index e4207740fc7..64b8b8fa3e0 100644
--- a/eval/src/vespa/eval/instruction/dense_simple_expand_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_simple_expand_function.cpp
@@ -98,10 +98,10 @@ DenseSimpleExpandFunction::DenseSimpleExpandFunction(const ValueType &result_typ
DenseSimpleExpandFunction::~DenseSimpleExpandFunction() = default;
Instruction
-DenseSimpleExpandFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+DenseSimpleExpandFunction::compile_self(const CTFContext &ctx) const
{
size_t result_size = result_type().dense_subspace_size();
- const ExpandParams &params = stash.create<ExpandParams>(result_type(), result_size, function());
+ const ExpandParams &params = ctx.stash.create<ExpandParams>(result_type(), result_size, function());
auto op = typify_invoke<4,MyTypify,SelectDenseSimpleExpand>(lhs().result_type().cell_meta().not_scalar(),
rhs().result_type().cell_meta().not_scalar(),
function(), (_inner == Inner::RHS));
diff --git a/eval/src/vespa/eval/instruction/dense_simple_expand_function.h b/eval/src/vespa/eval/instruction/dense_simple_expand_function.h
index 489859bcd88..a9d98b410c0 100644
--- a/eval/src/vespa/eval/instruction/dense_simple_expand_function.h
+++ b/eval/src/vespa/eval/instruction/dense_simple_expand_function.h
@@ -32,7 +32,7 @@ public:
Inner inner_in);
~DenseSimpleExpandFunction() override;
Inner inner() const { return _inner; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp b/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp
index 1f849b03737..d6e5b92da74 100644
--- a/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp
@@ -229,12 +229,12 @@ DenseSingleReduceFunction::DenseSingleReduceFunction(const DenseSingleReduceSpec
DenseSingleReduceFunction::~DenseSingleReduceFunction() = default;
InterpretedFunction::Instruction
-DenseSingleReduceFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+DenseSingleReduceFunction::compile_self(const CTFContext &ctx) const
{
auto op = typify_invoke<4,MyTypify,MyGetFun>(child().result_type().cell_meta().not_scalar(),
_aggr,
(_reduce_size >= 8), (_inner_size == 1));
- auto &params = stash.create<Params>(result_type(), _outer_size, _reduce_size, _inner_size);
+ auto &params = ctx.stash.create<Params>(result_type(), _outer_size, _reduce_size, _inner_size);
return InterpretedFunction::Instruction(op, wrap_param<Params>(params));
}
diff --git a/eval/src/vespa/eval/instruction/dense_single_reduce_function.h b/eval/src/vespa/eval/instruction/dense_single_reduce_function.h
index 465cb35edb3..3c02f1c5552 100644
--- a/eval/src/vespa/eval/instruction/dense_single_reduce_function.h
+++ b/eval/src/vespa/eval/instruction/dense_single_reduce_function.h
@@ -50,7 +50,7 @@ public:
size_t inner_size() const { return _inner_size; }
Aggr aggr() const { return _aggr; }
bool result_is_mutable() const override { return true; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_tensor_create_function.cpp b/eval/src/vespa/eval/instruction/dense_tensor_create_function.cpp
index ad1e8c8b67c..bc0ce336e1f 100644
--- a/eval/src/vespa/eval/instruction/dense_tensor_create_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_tensor_create_function.cpp
@@ -60,7 +60,7 @@ DenseTensorCreateFunction::push_children(std::vector<Child::CREF> &target) const
}
InterpretedFunction::Instruction
-DenseTensorCreateFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+DenseTensorCreateFunction::compile_self(const CTFContext &) const
{
using MyTypify = TypifyCellType;
auto op = typify_invoke<1,MyTypify,MyTensorCreateOp>(result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/dense_tensor_create_function.h b/eval/src/vespa/eval/instruction/dense_tensor_create_function.h
index c5788767e55..115c979cfc5 100644
--- a/eval/src/vespa/eval/instruction/dense_tensor_create_function.h
+++ b/eval/src/vespa/eval/instruction/dense_tensor_create_function.h
@@ -26,7 +26,7 @@ public:
~DenseTensorCreateFunction();
const ValueType &result_type() const override { return _self.result_type; }
void push_children(std::vector<Child::CREF> &children) const override;
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_tensor_peek_function.cpp b/eval/src/vespa/eval/instruction/dense_tensor_peek_function.cpp
index 68dcecb481c..80763eb6d08 100644
--- a/eval/src/vespa/eval/instruction/dense_tensor_peek_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_tensor_peek_function.cpp
@@ -60,7 +60,7 @@ DenseTensorPeekFunction::push_children(std::vector<Child::CREF> &target) const
}
InterpretedFunction::Instruction
-DenseTensorPeekFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+DenseTensorPeekFunction::compile_self(const CTFContext &) const
{
using MyTypify = TypifyCellType;
auto op = typify_invoke<1,MyTypify,MyTensorPeekOp>(_children[0].get().result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h b/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h
index 56dc72c93f7..39bfed4f11a 100644
--- a/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h
+++ b/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h
@@ -27,7 +27,7 @@ public:
~DenseTensorPeekFunction() override;
const ValueType &result_type() const override { return DoubleValue::shared_type(); }
void push_children(std::vector<Child::CREF> &children) const override;
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/dense_xw_product_function.cpp b/eval/src/vespa/eval/instruction/dense_xw_product_function.cpp
index e9b9cb12f40..fe1bdf80a2e 100644
--- a/eval/src/vespa/eval/instruction/dense_xw_product_function.cpp
+++ b/eval/src/vespa/eval/instruction/dense_xw_product_function.cpp
@@ -141,9 +141,9 @@ DenseXWProductFunction::DenseXWProductFunction(const ValueType &result_type,
}
InterpretedFunction::Instruction
-DenseXWProductFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+DenseXWProductFunction::compile_self(const CTFContext &ctx) const
{
- Self &self = stash.create<Self>(result_type(), _vector_size, _result_size);
+ Self &self = ctx.stash.create<Self>(result_type(), _vector_size, _result_size);
assert(self.result_type.cell_meta().is_scalar == false);
using MyTypify = TypifyValue<TypifyCellMeta,vespalib::TypifyBool>;
auto op = typify_invoke<3,MyTypify,MyXWProductOp>(lhs().result_type().cell_meta().not_scalar(),
diff --git a/eval/src/vespa/eval/instruction/dense_xw_product_function.h b/eval/src/vespa/eval/instruction/dense_xw_product_function.h
index aace80ff833..ecbe485fe54 100644
--- a/eval/src/vespa/eval/instruction/dense_xw_product_function.h
+++ b/eval/src/vespa/eval/instruction/dense_xw_product_function.h
@@ -43,7 +43,7 @@ public:
size_t result_size() const { return _result_size; }
bool common_inner() const { return _common_inner; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
void visit_self(vespalib::ObjectVisitor &visitor) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/generic_lambda.cpp b/eval/src/vespa/eval/instruction/generic_lambda.cpp
index 77d067c2b79..637982fffc4 100644
--- a/eval/src/vespa/eval/instruction/generic_lambda.cpp
+++ b/eval/src/vespa/eval/instruction/generic_lambda.cpp
@@ -87,11 +87,11 @@ struct InterpretedParams {
const std::vector<size_t> &bindings;
size_t num_cells;
InterpretedFunction fun;
- InterpretedParams(const Lambda &lambda, const ValueBuilderFactory &factory)
+ InterpretedParams(const Lambda &lambda, const ValueBuilderFactory &factory, CTFMetaData *meta)
: result_type(lambda.result_type()),
bindings(lambda.bindings()),
num_cells(result_type.dense_subspace_size()),
- fun(factory, lambda.lambda().root(), lambda.types())
+ fun(InterpretedFunction::opts(factory).meta(meta), lambda.lambda().root(), lambda.types())
{
assert(lambda.lambda().num_params() == (result_type.dimensions().size() + bindings.size()));
}
@@ -122,7 +122,8 @@ struct MyInterpretedLambdaOp {
Instruction
GenericLambda::make_instruction(const tensor_function::Lambda &lambda_in,
- const ValueBuilderFactory &factory, Stash &stash)
+ const ValueBuilderFactory &factory, Stash &stash,
+ CTFMetaData *meta)
{
const ValueType & result_type = lambda_in.result_type();
assert(result_type.count_mapped_dimensions() == 0);
@@ -134,7 +135,7 @@ GenericLambda::make_instruction(const tensor_function::Lambda &lambda_in,
auto op = typify_invoke<1,TypifyCellType,MyCompiledLambdaOp>(result_type.cell_type());
return Instruction(op, wrap_param<CompiledParams>(params));
} else {
- InterpretedParams &params = stash.create<InterpretedParams>(lambda_in, factory);
+ InterpretedParams &params = stash.create<InterpretedParams>(lambda_in, factory, meta);
auto op = typify_invoke<1,TypifyCellType,MyInterpretedLambdaOp>(result_type.cell_type());
return Instruction(op, wrap_param<InterpretedParams>(params));
}
diff --git a/eval/src/vespa/eval/instruction/generic_lambda.h b/eval/src/vespa/eval/instruction/generic_lambda.h
index e12151771ba..8ed879cd8d2 100644
--- a/eval/src/vespa/eval/instruction/generic_lambda.h
+++ b/eval/src/vespa/eval/instruction/generic_lambda.h
@@ -11,7 +11,8 @@ namespace vespalib::eval::instruction {
struct GenericLambda {
static InterpretedFunction::Instruction
make_instruction(const tensor_function::Lambda &lambda_in,
- const ValueBuilderFactory &factory, Stash &stash);
+ const ValueBuilderFactory &factory, Stash &stash,
+ CTFMetaData *meta);
};
} // namespace
diff --git a/eval/src/vespa/eval/instruction/generic_map_subspaces.cpp b/eval/src/vespa/eval/instruction/generic_map_subspaces.cpp
index 1238d4f4e57..76a8b758ce4 100644
--- a/eval/src/vespa/eval/instruction/generic_map_subspaces.cpp
+++ b/eval/src/vespa/eval/instruction/generic_map_subspaces.cpp
@@ -21,10 +21,10 @@ struct InterpretedParams {
size_t out_size;
bool direct_in;
bool direct_out;
- InterpretedParams(const MapSubspaces &map_subspaces, const ValueBuilderFactory &factory)
+ InterpretedParams(const MapSubspaces &map_subspaces, const ValueBuilderFactory &factory, CTFMetaData *meta)
: result_type(map_subspaces.result_type()),
inner_type(map_subspaces.inner_type()),
- fun(factory, map_subspaces.lambda().root(), map_subspaces.types()),
+ fun(InterpretedFunction::opts(factory).meta(meta), map_subspaces.lambda().root(), map_subspaces.types()),
in_size(inner_type.dense_subspace_size()),
out_size(result_type.dense_subspace_size()),
direct_in(map_subspaces.child().result_type().cell_type() == inner_type.cell_type()),
@@ -107,9 +107,10 @@ struct SelectGenericMapSubspacesOp {
Instruction
GenericMapSubspaces::make_instruction(const tensor_function::MapSubspaces &map_subspaces_in,
- const ValueBuilderFactory &factory, Stash &stash)
+ const ValueBuilderFactory &factory, Stash &stash,
+ CTFMetaData *meta)
{
- InterpretedParams &params = stash.create<InterpretedParams>(map_subspaces_in, factory);
+ InterpretedParams &params = stash.create<InterpretedParams>(map_subspaces_in, factory, meta);
auto op = typify_invoke<2,TypifyCellType,SelectGenericMapSubspacesOp>(map_subspaces_in.child().result_type().cell_type(),
params.result_type.cell_type());
return Instruction(op, wrap_param<InterpretedParams>(params));
diff --git a/eval/src/vespa/eval/instruction/generic_map_subspaces.h b/eval/src/vespa/eval/instruction/generic_map_subspaces.h
index f95ded60a1b..2d0c3b101b0 100644
--- a/eval/src/vespa/eval/instruction/generic_map_subspaces.h
+++ b/eval/src/vespa/eval/instruction/generic_map_subspaces.h
@@ -11,7 +11,8 @@ namespace vespalib::eval::instruction {
struct GenericMapSubspaces {
static InterpretedFunction::Instruction
make_instruction(const tensor_function::MapSubspaces &map_subspaces_in,
- const ValueBuilderFactory &factory, Stash &stash);
+ const ValueBuilderFactory &factory, Stash &stash,
+ CTFMetaData *meta);
};
} // namespace
diff --git a/eval/src/vespa/eval/instruction/inplace_map_function.cpp b/eval/src/vespa/eval/instruction/inplace_map_function.cpp
index ee013f3b753..78726098ea2 100644
--- a/eval/src/vespa/eval/instruction/inplace_map_function.cpp
+++ b/eval/src/vespa/eval/instruction/inplace_map_function.cpp
@@ -52,7 +52,7 @@ InplaceMapFunction::InplaceMapFunction(const ValueType &result_type,
InplaceMapFunction::~InplaceMapFunction() = default;
Instruction
-InplaceMapFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+InplaceMapFunction::compile_self(const CTFContext &) const
{
auto input_cell_meta = child().result_type().cell_meta().limit().not_scalar();
auto op = typify_invoke<2,MyTypify,MyGetFun>(input_cell_meta, function());
diff --git a/eval/src/vespa/eval/instruction/inplace_map_function.h b/eval/src/vespa/eval/instruction/inplace_map_function.h
index 172693ab2bf..74fb559248d 100644
--- a/eval/src/vespa/eval/instruction/inplace_map_function.h
+++ b/eval/src/vespa/eval/instruction/inplace_map_function.h
@@ -18,7 +18,7 @@ public:
map_fun_t function_in);
~InplaceMapFunction() override;
bool inplace() const { return child().result_is_mutable(); }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/join_with_number_function.cpp b/eval/src/vespa/eval/instruction/join_with_number_function.cpp
index d24a69e33a7..c41867242f0 100644
--- a/eval/src/vespa/eval/instruction/join_with_number_function.cpp
+++ b/eval/src/vespa/eval/instruction/join_with_number_function.cpp
@@ -89,9 +89,9 @@ JoinWithNumberFunction::primary_is_mutable() const {
using MyTypify = TypifyValue<TypifyCellMeta,vespalib::TypifyBool,operation::TypifyOp2>;
InterpretedFunction::Instruction
-JoinWithNumberFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+JoinWithNumberFunction::compile_self(const CTFContext &ctx) const
{
- const auto &param = stash.create<JoinWithNumberParam>(result_type(), _function);
+ const auto &param = ctx.stash.create<JoinWithNumberParam>(result_type(), _function);
auto input_type = (_primary == Primary::LHS) ? lhs().result_type() : rhs().result_type();
assert(result_type() == ValueType::join(input_type, ValueType::double_type()));
auto op = typify_invoke<4,MyTypify,SelectJoinWithNumberOp>(input_type.cell_meta(),
diff --git a/eval/src/vespa/eval/instruction/join_with_number_function.h b/eval/src/vespa/eval/instruction/join_with_number_function.h
index b26e626818a..0e33958879f 100644
--- a/eval/src/vespa/eval/instruction/join_with_number_function.h
+++ b/eval/src/vespa/eval/instruction/join_with_number_function.h
@@ -26,7 +26,7 @@ public:
bool primary_is_mutable() const;
bool result_is_mutable() const override { return true; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
void visit_self(vespalib::ObjectVisitor &visitor) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/l2_distance.cpp b/eval/src/vespa/eval/instruction/l2_distance.cpp
index 9490044a39b..5298468ab02 100644
--- a/eval/src/vespa/eval/instruction/l2_distance.cpp
+++ b/eval/src/vespa/eval/instruction/l2_distance.cpp
@@ -65,7 +65,7 @@ L2Distance::L2Distance(const TensorFunction &lhs_in, const TensorFunction &rhs_i
}
InterpretedFunction::Instruction
-L2Distance::compile_self(const ValueBuilderFactory &, Stash &) const
+L2Distance::compile_self(const CTFContext &) const
{
auto lhs_t = lhs().result_type();
auto rhs_t = rhs().result_type();
diff --git a/eval/src/vespa/eval/instruction/l2_distance.h b/eval/src/vespa/eval/instruction/l2_distance.h
index 5d50b4ee283..a9138a169ce 100644
--- a/eval/src/vespa/eval/instruction/l2_distance.h
+++ b/eval/src/vespa/eval/instruction/l2_distance.h
@@ -13,7 +13,7 @@ class L2Distance : public tensor_function::Op2
{
public:
L2Distance(const TensorFunction &lhs_in, const TensorFunction &rhs_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/mapped_lookup.cpp b/eval/src/vespa/eval/instruction/mapped_lookup.cpp
index 49048689ef8..22d99211a3b 100644
--- a/eval/src/vespa/eval/instruction/mapped_lookup.cpp
+++ b/eval/src/vespa/eval/instruction/mapped_lookup.cpp
@@ -117,7 +117,7 @@ MappedLookup::MappedLookup(const ValueType &res_type,
}
InterpretedFunction::Instruction
-MappedLookup::compile_self(const ValueBuilderFactory &, Stash &) const
+MappedLookup::compile_self(const CTFContext &) const
{
uint64_t param = wrap_param<ValueType>(result_type());
if (result_type().cell_type() == CellType::FLOAT) {
diff --git a/eval/src/vespa/eval/instruction/mapped_lookup.h b/eval/src/vespa/eval/instruction/mapped_lookup.h
index 7fc55326e1b..ea1a0648b41 100644
--- a/eval/src/vespa/eval/instruction/mapped_lookup.h
+++ b/eval/src/vespa/eval/instruction/mapped_lookup.h
@@ -41,7 +41,7 @@ public:
MappedLookup(const ValueType &res_type, const TensorFunction &key_in, const TensorFunction &map_in);
const TensorFunction &key() const { return lhs(); }
const TensorFunction &map() const { return rhs(); }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return map().result_is_mutable(); }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/mixed_112_dot_product.cpp b/eval/src/vespa/eval/instruction/mixed_112_dot_product.cpp
index 992636b15d5..5678adda3b3 100644
--- a/eval/src/vespa/eval/instruction/mixed_112_dot_product.cpp
+++ b/eval/src/vespa/eval/instruction/mixed_112_dot_product.cpp
@@ -208,7 +208,7 @@ Mixed112DotProduct::Mixed112DotProduct(const TensorFunction &a_in,
}
InterpretedFunction::Instruction
-Mixed112DotProduct::compile_self(const ValueBuilderFactory &, Stash &) const
+Mixed112DotProduct::compile_self(const CTFContext &) const
{
REQUIRE_EQ(_a.get().result_type().cell_type(), _b.get().result_type().cell_type());
REQUIRE_EQ(_a.get().result_type().cell_type(), _c.get().result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/mixed_112_dot_product.h b/eval/src/vespa/eval/instruction/mixed_112_dot_product.h
index d0c3c18b996..c43a4074a16 100644
--- a/eval/src/vespa/eval/instruction/mixed_112_dot_product.h
+++ b/eval/src/vespa/eval/instruction/mixed_112_dot_product.h
@@ -21,7 +21,7 @@ public:
Mixed112DotProduct(const TensorFunction &a_in,
const TensorFunction &b_in,
const TensorFunction &c_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
void push_children(std::vector<Child::CREF> &children) const final override;
void visit_children(vespalib::ObjectVisitor &visitor) const final override;
diff --git a/eval/src/vespa/eval/instruction/mixed_inner_product_function.cpp b/eval/src/vespa/eval/instruction/mixed_inner_product_function.cpp
index 5c90dcebfd9..efd3398ef0c 100644
--- a/eval/src/vespa/eval/instruction/mixed_inner_product_function.cpp
+++ b/eval/src/vespa/eval/instruction/mixed_inner_product_function.cpp
@@ -65,11 +65,11 @@ MixedInnerProductFunction::MixedInnerProductFunction(const ValueType &res_type_i
}
InterpretedFunction::Instruction
-MixedInnerProductFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+MixedInnerProductFunction::compile_self(const CTFContext &ctx) const
{
const auto &mix_type = lhs().result_type();
const auto &vec_type = rhs().result_type();
- auto &param = stash.create<MixedInnerProductParam>(result_type(), mix_type, vec_type);
+ auto &param = ctx.stash.create<MixedInnerProductParam>(result_type(), mix_type, vec_type);
using MyTypify = TypifyValue<TypifyCellType>;
auto op = typify_invoke<3,MyTypify,SelectMixedInnerProduct>(mix_type.cell_type(),
vec_type.cell_type(),
diff --git a/eval/src/vespa/eval/instruction/mixed_inner_product_function.h b/eval/src/vespa/eval/instruction/mixed_inner_product_function.h
index 6eee998d4bd..00fa038ee48 100644
--- a/eval/src/vespa/eval/instruction/mixed_inner_product_function.h
+++ b/eval/src/vespa/eval/instruction/mixed_inner_product_function.h
@@ -37,7 +37,7 @@ public:
MixedInnerProductFunction(const ValueType &res_type_in,
const TensorFunction &mixed_child,
const TensorFunction &vector_child);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static bool compatible_types(const ValueType &res, const ValueType &mixed, const ValueType &dense);
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp b/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp
index 1a5293789c5..1ac741d65db 100644
--- a/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp
+++ b/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp
@@ -90,13 +90,13 @@ MixedL2Distance::MixedL2Distance(const ValueType &result_type, const TensorFunct
}
InterpretedFunction::Instruction
-MixedL2Distance::compile_self(const ValueBuilderFactory &, Stash &stash) const
+MixedL2Distance::compile_self(const CTFContext &ctx) const
{
auto mix_t = lhs().result_type();
auto vec_t = rhs().result_type();
REQUIRE_EQ(mix_t.cell_type(), vec_t.cell_type());
REQUIRE_EQ(mix_t.dense_subspace_size(), vec_t.dense_subspace_size());
- const auto &param = stash.create<MixedSqL2Param>(result_type(), mix_t.dense_subspace_size());
+ const auto &param = ctx.stash.create<MixedSqL2Param>(result_type(), mix_t.dense_subspace_size());
auto mix_cm = mix_t.cell_meta().not_scalar();
auto res_cm = mix_t.cell_meta().decay();
REQUIRE_EQ(res_cm.cell_type, result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/mixed_l2_distance.h b/eval/src/vespa/eval/instruction/mixed_l2_distance.h
index a5f2e2f6273..c105a731456 100644
--- a/eval/src/vespa/eval/instruction/mixed_l2_distance.h
+++ b/eval/src/vespa/eval/instruction/mixed_l2_distance.h
@@ -13,7 +13,7 @@ class MixedL2Distance : public tensor_function::Op2
{
public:
MixedL2Distance(const ValueType &result_type, const TensorFunction &mix_in, const TensorFunction &vec_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/mixed_simple_join_function.cpp b/eval/src/vespa/eval/instruction/mixed_simple_join_function.cpp
index 845c6d8472c..e1d04e580a7 100644
--- a/eval/src/vespa/eval/instruction/mixed_simple_join_function.cpp
+++ b/eval/src/vespa/eval/instruction/mixed_simple_join_function.cpp
@@ -208,9 +208,9 @@ MixedSimpleJoinFunction::factor() const
}
Instruction
-MixedSimpleJoinFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const
+MixedSimpleJoinFunction::compile_self(const CTFContext &ctx) const
{
- const JoinParams &params = stash.create<JoinParams>(result_type(), factor(), function());
+ const JoinParams &params = ctx.stash.create<JoinParams>(result_type(), factor(), function());
auto op = typify_invoke<6,MyTypify,SelectMixedSimpleJoin>(lhs().result_type().cell_meta().not_scalar(),
rhs().result_type().cell_meta().not_scalar(),
function(), (_primary == Primary::RHS),
diff --git a/eval/src/vespa/eval/instruction/mixed_simple_join_function.h b/eval/src/vespa/eval/instruction/mixed_simple_join_function.h
index 873ed55dbe6..19427250e6b 100644
--- a/eval/src/vespa/eval/instruction/mixed_simple_join_function.h
+++ b/eval/src/vespa/eval/instruction/mixed_simple_join_function.h
@@ -42,7 +42,7 @@ public:
bool primary_is_mutable() const;
bool inplace() const;
size_t factor() const;
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/replace_type_function.cpp b/eval/src/vespa/eval/instruction/replace_type_function.cpp
index 01fe43cb16d..2d66d055834 100644
--- a/eval/src/vespa/eval/instruction/replace_type_function.cpp
+++ b/eval/src/vespa/eval/instruction/replace_type_function.cpp
@@ -29,7 +29,7 @@ ReplaceTypeFunction::~ReplaceTypeFunction()
}
InterpretedFunction::Instruction
-ReplaceTypeFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+ReplaceTypeFunction::compile_self(const CTFContext &) const
{
return InterpretedFunction::Instruction(my_replace_type_op, wrap_param<ValueType>(result_type()));
}
diff --git a/eval/src/vespa/eval/instruction/replace_type_function.h b/eval/src/vespa/eval/instruction/replace_type_function.h
index 506c7d4e124..658494dd753 100644
--- a/eval/src/vespa/eval/instruction/replace_type_function.h
+++ b/eval/src/vespa/eval/instruction/replace_type_function.h
@@ -15,7 +15,7 @@ public:
ReplaceTypeFunction(const ValueType &result_type,
const TensorFunction &child);
~ReplaceTypeFunction();
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return child().result_is_mutable(); }
static const ReplaceTypeFunction &create_compact(const ValueType &result_type,
const TensorFunction &child,
diff --git a/eval/src/vespa/eval/instruction/simple_join_count.cpp b/eval/src/vespa/eval/instruction/simple_join_count.cpp
index 6d6e4872d28..23b816374a9 100644
--- a/eval/src/vespa/eval/instruction/simple_join_count.cpp
+++ b/eval/src/vespa/eval/instruction/simple_join_count.cpp
@@ -68,7 +68,7 @@ SimpleJoinCount::SimpleJoinCount(const TensorFunction &lhs_in,
}
InterpretedFunction::Instruction
-SimpleJoinCount::compile_self(const ValueBuilderFactory &, Stash &) const
+SimpleJoinCount::compile_self(const CTFContext &) const
{
return InterpretedFunction::Instruction(my_simple_join_count_op, _dense_factor);
}
diff --git a/eval/src/vespa/eval/instruction/simple_join_count.h b/eval/src/vespa/eval/instruction/simple_join_count.h
index 02c81dbebe1..75f4b5cfde7 100644
--- a/eval/src/vespa/eval/instruction/simple_join_count.h
+++ b/eval/src/vespa/eval/instruction/simple_join_count.h
@@ -17,7 +17,7 @@ private:
uint64_t _dense_factor;
public:
SimpleJoinCount(const TensorFunction &lhs_in, const TensorFunction &rhs_in, uint64_t dense_factor_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
uint64_t dense_factor() const { return _dense_factor; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/sparse_112_dot_product.cpp b/eval/src/vespa/eval/instruction/sparse_112_dot_product.cpp
index 402d55bd447..32fd10df862 100644
--- a/eval/src/vespa/eval/instruction/sparse_112_dot_product.cpp
+++ b/eval/src/vespa/eval/instruction/sparse_112_dot_product.cpp
@@ -194,7 +194,7 @@ Sparse112DotProduct::Sparse112DotProduct(const TensorFunction &a_in,
}
InterpretedFunction::Instruction
-Sparse112DotProduct::compile_self(const ValueBuilderFactory &, Stash &) const
+Sparse112DotProduct::compile_self(const CTFContext &) const
{
REQUIRE_EQ(_a.get().result_type().cell_type(), _b.get().result_type().cell_type());
REQUIRE_EQ(_a.get().result_type().cell_type(), _c.get().result_type().cell_type());
diff --git a/eval/src/vespa/eval/instruction/sparse_112_dot_product.h b/eval/src/vespa/eval/instruction/sparse_112_dot_product.h
index 16d58327e40..0bfe3cac993 100644
--- a/eval/src/vespa/eval/instruction/sparse_112_dot_product.h
+++ b/eval/src/vespa/eval/instruction/sparse_112_dot_product.h
@@ -21,7 +21,7 @@ public:
Sparse112DotProduct(const TensorFunction &a_in,
const TensorFunction &b_in,
const TensorFunction &c_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
void push_children(std::vector<Child::CREF> &children) const final override;
void visit_children(vespalib::ObjectVisitor &visitor) const final override;
diff --git a/eval/src/vespa/eval/instruction/sparse_dot_product_function.cpp b/eval/src/vespa/eval/instruction/sparse_dot_product_function.cpp
index aa441047e74..b20b065f1b1 100644
--- a/eval/src/vespa/eval/instruction/sparse_dot_product_function.cpp
+++ b/eval/src/vespa/eval/instruction/sparse_dot_product_function.cpp
@@ -92,7 +92,7 @@ SparseDotProductFunction::SparseDotProductFunction(const TensorFunction &lhs_in,
}
InterpretedFunction::Instruction
-SparseDotProductFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+SparseDotProductFunction::compile_self(const CTFContext &) const
{
size_t num_dims = lhs().result_type().count_mapped_dimensions();
auto op = typify_invoke<2,MyTypify,MyGetFun>(lhs().result_type().cell_type(),
diff --git a/eval/src/vespa/eval/instruction/sparse_dot_product_function.h b/eval/src/vespa/eval/instruction/sparse_dot_product_function.h
index 093bbdafe47..f2fc439bb9c 100644
--- a/eval/src/vespa/eval/instruction/sparse_dot_product_function.h
+++ b/eval/src/vespa/eval/instruction/sparse_dot_product_function.h
@@ -14,7 +14,7 @@ class SparseDotProductFunction : public tensor_function::Op2
public:
SparseDotProductFunction(const TensorFunction &lhs_in,
const TensorFunction &rhs_in);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static bool compatible_types(const ValueType &res, const ValueType &lhs, const ValueType &rhs);
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.cpp b/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.cpp
index 2c31003e30d..a8a48419bf2 100644
--- a/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.cpp
+++ b/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.cpp
@@ -97,9 +97,9 @@ SparseFullOverlapJoinFunction::SparseFullOverlapJoinFunction(const tensor_functi
}
InterpretedFunction::Instruction
-SparseFullOverlapJoinFunction::compile_self(const ValueBuilderFactory &factory, Stash &stash) const
+SparseFullOverlapJoinFunction::compile_self(const CTFContext &ctx) const
{
- const auto &param = stash.create<JoinParam>(result_type(), lhs().result_type(), rhs().result_type(), function(), factory);
+ const auto &param = ctx.stash.create<JoinParam>(result_type(), lhs().result_type(), rhs().result_type(), function(), ctx.factory);
assert(result_type() == ValueType::join(lhs().result_type(), rhs().result_type()));
bool single_dim = (result_type().count_mapped_dimensions() == 1);
auto op = typify_invoke<3,MyTypify,SelectSparseFullOverlapJoinOp>(result_type().cell_meta().limit(), function(), single_dim);
diff --git a/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.h b/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.h
index 91b6b88e0c7..38c94598f95 100644
--- a/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.h
+++ b/eval/src/vespa/eval/instruction/sparse_full_overlap_join_function.h
@@ -13,7 +13,7 @@ class SparseFullOverlapJoinFunction : public tensor_function::Join
{
public:
SparseFullOverlapJoinFunction(const tensor_function::Join &original);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static bool compatible_types(const ValueType &res, const ValueType &lhs, const ValueType &rhs);
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/sparse_merge_function.cpp b/eval/src/vespa/eval/instruction/sparse_merge_function.cpp
index 6dff7440d01..57d0c536e8d 100644
--- a/eval/src/vespa/eval/instruction/sparse_merge_function.cpp
+++ b/eval/src/vespa/eval/instruction/sparse_merge_function.cpp
@@ -108,11 +108,11 @@ SparseMergeFunction::SparseMergeFunction(const tensor_function::Merge &original)
}
InterpretedFunction::Instruction
-SparseMergeFunction::compile_self(const ValueBuilderFactory &factory, Stash &stash) const
+SparseMergeFunction::compile_self(const CTFContext &ctx) const
{
- const auto &param = stash.create<MergeParam>(result_type(),
- lhs().result_type(), rhs().result_type(),
- function(), factory);
+ const auto &param = ctx.stash.create<MergeParam>(result_type(),
+ lhs().result_type(), rhs().result_type(),
+ function(), ctx.factory);
size_t num_dims = result_type().count_mapped_dimensions();
auto op = typify_invoke<3,MyTypify,SelectSparseMergeOp>(result_type().cell_meta().limit(),
num_dims == 1,
diff --git a/eval/src/vespa/eval/instruction/sparse_merge_function.h b/eval/src/vespa/eval/instruction/sparse_merge_function.h
index 49fa0cb0996..3db36fb2f81 100644
--- a/eval/src/vespa/eval/instruction/sparse_merge_function.h
+++ b/eval/src/vespa/eval/instruction/sparse_merge_function.h
@@ -13,7 +13,7 @@ class SparseMergeFunction : public tensor_function::Merge
{
public:
SparseMergeFunction(const tensor_function::Merge &original);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static bool compatible_types(const ValueType &res, const ValueType &lhs, const ValueType &rhs);
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp b/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp
index 9153d65309d..f4bb5ec4b73 100644
--- a/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp
+++ b/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp
@@ -103,11 +103,11 @@ SparseNoOverlapJoinFunction::SparseNoOverlapJoinFunction(const tensor_function::
}
InterpretedFunction::Instruction
-SparseNoOverlapJoinFunction::compile_self(const ValueBuilderFactory &factory, Stash &stash) const
+SparseNoOverlapJoinFunction::compile_self(const CTFContext &ctx) const
{
- const auto &param = stash.create<JoinParam>(result_type(),
- lhs().result_type(), rhs().result_type(),
- function(), factory);
+ const auto &param = ctx.stash.create<JoinParam>(result_type(),
+ lhs().result_type(), rhs().result_type(),
+ function(), ctx.factory);
auto op = typify_invoke<2,MyTypify,SelectSparseNoOverlapJoinOp>(result_type().cell_meta().limit(), function());
return {op, wrap_param<JoinParam>(param)};
}
diff --git a/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.h b/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.h
index 9a8acc08408..29e74113829 100644
--- a/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.h
+++ b/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.h
@@ -14,7 +14,7 @@ class SparseNoOverlapJoinFunction : public tensor_function::Join
{
public:
SparseNoOverlapJoinFunction(const tensor_function::Join &original);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static bool compatible_types(const ValueType &res, const ValueType &lhs, const ValueType &rhs);
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/sparse_singledim_lookup.cpp b/eval/src/vespa/eval/instruction/sparse_singledim_lookup.cpp
index d7701baf5ce..2c2060cf3d5 100644
--- a/eval/src/vespa/eval/instruction/sparse_singledim_lookup.cpp
+++ b/eval/src/vespa/eval/instruction/sparse_singledim_lookup.cpp
@@ -60,7 +60,7 @@ SparseSingledimLookup::SparseSingledimLookup(const TensorFunction &tensor,
}
InterpretedFunction::Instruction
-SparseSingledimLookup::compile_self(const ValueBuilderFactory &, Stash &) const
+SparseSingledimLookup::compile_self(const CTFContext &) const
{
auto op = typify_invoke<1,TypifyCellType,MyGetFun>(lhs().result_type().cell_type());
return InterpretedFunction::Instruction(op);
diff --git a/eval/src/vespa/eval/instruction/sparse_singledim_lookup.h b/eval/src/vespa/eval/instruction/sparse_singledim_lookup.h
index c5d07f3381c..ed2e7e1ea3f 100644
--- a/eval/src/vespa/eval/instruction/sparse_singledim_lookup.h
+++ b/eval/src/vespa/eval/instruction/sparse_singledim_lookup.h
@@ -16,7 +16,7 @@ class SparseSingledimLookup : public tensor_function::Op2
{
public:
SparseSingledimLookup(const TensorFunction &tensor, const TensorFunction &expr);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/sum_max_dot_product_function.cpp b/eval/src/vespa/eval/instruction/sum_max_dot_product_function.cpp
index 0ca1ed9705b..74281e67389 100644
--- a/eval/src/vespa/eval/instruction/sum_max_dot_product_function.cpp
+++ b/eval/src/vespa/eval/instruction/sum_max_dot_product_function.cpp
@@ -91,7 +91,7 @@ SumMaxDotProductFunction::SumMaxDotProductFunction(const ValueType &res_type_in,
}
InterpretedFunction::Instruction
-SumMaxDotProductFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+SumMaxDotProductFunction::compile_self(const CTFContext &) const
{
return InterpretedFunction::Instruction(my_sum_max_dot_product_op, _dp_size);
}
diff --git a/eval/src/vespa/eval/instruction/sum_max_dot_product_function.h b/eval/src/vespa/eval/instruction/sum_max_dot_product_function.h
index 23bc102e1f3..a9b0152251b 100644
--- a/eval/src/vespa/eval/instruction/sum_max_dot_product_function.h
+++ b/eval/src/vespa/eval/instruction/sum_max_dot_product_function.h
@@ -40,7 +40,7 @@ public:
const TensorFunction &query,
const TensorFunction &document,
size_t dp_size);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
size_t dp_size() const { return _dp_size; }
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
diff --git a/eval/src/vespa/eval/instruction/universal_dot_product.cpp b/eval/src/vespa/eval/instruction/universal_dot_product.cpp
index 0271fb9ce86..828577790ef 100644
--- a/eval/src/vespa/eval/instruction/universal_dot_product.cpp
+++ b/eval/src/vespa/eval/instruction/universal_dot_product.cpp
@@ -200,9 +200,9 @@ UniversalDotProduct::UniversalDotProduct(const ValueType &res_type_in,
}
InterpretedFunction::Instruction
-UniversalDotProduct::compile_self(const ValueBuilderFactory &, Stash &stash) const
+UniversalDotProduct::compile_self(const CTFContext &ctx) const
{
- auto &param = stash.create<UniversalDotProductParam>(result_type(), lhs().result_type(), rhs().result_type());
+ auto &param = ctx.stash.create<UniversalDotProductParam>(result_type(), lhs().result_type(), rhs().result_type());
using MyTypify = TypifyValue<TypifyCellMeta,TypifyBool>;
auto op = typify_invoke<6,MyTypify,SelectUniversalDotProduct>(lhs().result_type().cell_meta(),
rhs().result_type().cell_meta(),
diff --git a/eval/src/vespa/eval/instruction/universal_dot_product.h b/eval/src/vespa/eval/instruction/universal_dot_product.h
index 14dbd6e1766..6c40c7bdc68 100644
--- a/eval/src/vespa/eval/instruction/universal_dot_product.h
+++ b/eval/src/vespa/eval/instruction/universal_dot_product.h
@@ -17,7 +17,7 @@ class UniversalDotProduct : public tensor_function::Op2
{
public:
UniversalDotProduct(const ValueType &res_type, const TensorFunction &lhs, const TensorFunction &rhs);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
bool forward() const;
bool distinct() const;
diff --git a/eval/src/vespa/eval/instruction/unpack_bits_function.cpp b/eval/src/vespa/eval/instruction/unpack_bits_function.cpp
index 117bac79fe3..d0a75b03c04 100644
--- a/eval/src/vespa/eval/instruction/unpack_bits_function.cpp
+++ b/eval/src/vespa/eval/instruction/unpack_bits_function.cpp
@@ -178,7 +178,7 @@ UnpackBitsFunction::UnpackBitsFunction(const ValueType &res_type_in,
}
InterpretedFunction::Instruction
-UnpackBitsFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+UnpackBitsFunction::compile_self(const CTFContext &) const
{
const ValueType &res_type = result_type();
auto op = typify_invoke<2,MyTypify,MyGetFun>(res_type.cell_type(), _big_bitorder);
diff --git a/eval/src/vespa/eval/instruction/unpack_bits_function.h b/eval/src/vespa/eval/instruction/unpack_bits_function.h
index 52360e7a4e2..02cee50ef4d 100644
--- a/eval/src/vespa/eval/instruction/unpack_bits_function.h
+++ b/eval/src/vespa/eval/instruction/unpack_bits_function.h
@@ -30,7 +30,7 @@ private:
bool _big_bitorder;
public:
UnpackBitsFunction(const ValueType &res_type_in, const TensorFunction &packed, bool big);
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};
diff --git a/eval/src/vespa/eval/instruction/vector_from_doubles_function.cpp b/eval/src/vespa/eval/instruction/vector_from_doubles_function.cpp
index cd262bcbec1..d8e1d7cb52f 100644
--- a/eval/src/vespa/eval/instruction/vector_from_doubles_function.cpp
+++ b/eval/src/vespa/eval/instruction/vector_from_doubles_function.cpp
@@ -86,7 +86,7 @@ VectorFromDoublesFunction::push_children(std::vector<Child::CREF> &target) const
}
InterpretedFunction::Instruction
-VectorFromDoublesFunction::compile_self(const ValueBuilderFactory &, Stash &) const
+VectorFromDoublesFunction::compile_self(const CTFContext &) const
{
return InterpretedFunction::Instruction(my_vector_from_doubles_op, wrap_param<VectorFromDoublesFunction::Self>(_self));
}
diff --git a/eval/src/vespa/eval/instruction/vector_from_doubles_function.h b/eval/src/vespa/eval/instruction/vector_from_doubles_function.h
index 6af873f18d1..cb61dc04ec7 100644
--- a/eval/src/vespa/eval/instruction/vector_from_doubles_function.h
+++ b/eval/src/vespa/eval/instruction/vector_from_doubles_function.h
@@ -32,7 +32,7 @@ public:
return _self.resultType.dimensions()[0].name;
}
size_t size() const { return _self.resultSize; }
- InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
+ InterpretedFunction::Instruction compile_self(const CTFContext &ctx) const override;
bool result_is_mutable() const override { return true; }
static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};