blob: a756c2ce8e158dc8b26504a2d538f4d2aa8019ee (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstddef>
#include <cstdint>
namespace search { class AttributeVector; }
namespace search::attribute {
class AttributeHeader;
class Config;
}
namespace proton {
/**
* Class to calculate transient memory during load of attribute vector
* in the future based on current attribute vector and new config.
*/
class AttributeTransientMemoryCalculator
{
public:
AttributeTransientMemoryCalculator() = default;
~AttributeTransientMemoryCalculator() = default;
size_t operator()(const search::AttributeVector& attribute_vector,
const search::attribute::Config& new_config) const;
size_t operator()(const search::attribute::AttributeHeader& old_header,
const search::attribute::Config& new_config) const;
};
}
|