MCPcopy Create free account
hub / github.com/catboost/catboost / Flatten2D

Function Flatten2D

catboost/cuda/gpu_data/doc_parallel_dataset_builder.cpp:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7template <typename T>
8static TVector<T> Flatten2D(TVector<TVector<T>>&& src) {
9 if (src.empty()) {
10 return TVector<T>();
11 }
12 TVector<T> result;
13 result.reserve(src.size() * src[0].size());
14 for (const auto& v : src) {
15 result.insert(result.end(), v.begin(), v.end());
16 }
17 return result;
18}
19
20NCatboostCuda::TDocParallelDataSetsHolder NCatboostCuda::TDocParallelDataSetBuilder::BuildDataSet(const ui32 permutationCount,
21 NPar::ILocalExecutor* localExecutor) {

Callers 1

BuildDataSetMethod · 0.85

Calls 6

emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected