aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/apps/tensor_conformance/generate.h
blob: 7e4a2e07176c743d30bce36bcce7fe8d7b4bc926 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/eval/eval/tensor_spec.h>
#include <map>
#include <set>

struct TestBuilder {
    bool full;
    TestBuilder(bool full_in) : full(full_in) {}
    using TensorSpec = vespalib::eval::TensorSpec;
    virtual void add(const vespalib::string &expression,
                     const std::map<vespalib::string,TensorSpec> &inputs,
                     const std::set<vespalib::string> &ignore) = 0;
    void add(const vespalib::string &expression,
             const std::map<vespalib::string,TensorSpec> &inputs)
    {
        add(expression, inputs, {});
    }
    virtual ~TestBuilder() {}
};

struct Generator {
    static void generate(TestBuilder &out);
};