Welcome to mirror list, hosted at ThFree Co, Russian Federation.

features_processing_helpers.hpp « generator - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 203f6bbe23fb2a7b226cf0068d816ef5efe2c08c (plain)
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
#pragma once

#include "generator/feature_builder.hpp"

#include "base/thread_safe_queue.hpp"

#include <cstddef>
#include <optional>
#include <utility>
#include <string>
#include <vector>

namespace generator
{
size_t static const kAffiliationsBufferSize = 512;

struct ProcessedData
{
  explicit ProcessedData(feature::FeatureBuilder::Buffer && buffer,
                         std::vector<std::string> && affiliations)
    : m_buffer(std::move(buffer)), m_affiliations(std::move(affiliations)) {}

  feature::FeatureBuilder::Buffer m_buffer;
  std::vector<std::string> m_affiliations;
};

using FeatureProcessorChunk = std::optional<std::vector<ProcessedData>>;
using FeatureProcessorQueue = base::threads::ThreadSafeQueue<FeatureProcessorChunk>;
}  // namespace generator