summaryrefslogtreecommitdiffstats
path: root/eval/src/vespa/eval/instruction/generic_peek.h
diff options
context:
space:
mode:
Diffstat (limited to 'eval/src/vespa/eval/instruction/generic_peek.h')
-rw-r--r--eval/src/vespa/eval/instruction/generic_peek.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/eval/src/vespa/eval/instruction/generic_peek.h b/eval/src/vespa/eval/instruction/generic_peek.h
new file mode 100644
index 00000000000..d31b47238cb
--- /dev/null
+++ b/eval/src/vespa/eval/instruction/generic_peek.h
@@ -0,0 +1,29 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/eval/eval/value_type.h>
+#include <vespa/eval/eval/tensor_spec.h>
+#include <vespa/eval/eval/interpreted_function.h>
+#include <map>
+
+namespace vespalib { class Stash; }
+namespace vespalib::eval { struct ValueBuilderFactory; }
+
+namespace vespalib::eval::instruction {
+
+//-----------------------------------------------------------------------------
+
+struct GenericPeek {
+ using MyLabel = std::variant<TensorSpec::Label, size_t>;
+ using SpecMap = std::map<vespalib::string, MyLabel>;
+
+ static InterpretedFunction::Instruction
+ make_instruction(const ValueType &input_type,
+ const ValueType &res_type,
+ const SpecMap &spec,
+ const ValueBuilderFactory &factory,
+ Stash &stash);
+};
+
+} // namespace