blob: f2ad3bc6eb6dac07c40eb4c2f0f6b127c86d616b (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "lazy_params.h"
#include <vespa/vespalib/util/stash.h>
#include <cassert>
namespace vespalib::eval {
LazyParams::~LazyParams() = default;
//-----------------------------------------------------------------------------
SimpleObjectParams::~SimpleObjectParams() = default;
const Value &
SimpleObjectParams::resolve(size_t idx, Stash &) const
{
assert(idx < params.size());
return params[idx];
}
//-----------------------------------------------------------------------------
SimpleParams::~SimpleParams() = default;
const Value &
SimpleParams::resolve(size_t idx, Stash &stash) const
{
assert(idx < params.size());
return stash.create<DoubleValue>(params[idx]);
}
//-----------------------------------------------------------------------------
NoParams NoParams::params;
//-----------------------------------------------------------------------------
} // namespace vespalib::eval
|