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

Function MapVector

catboost/private/libs/distributed/mappers.cpp:384–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382
383 template <typename TMapFunc, typename TInputType, typename TOutputType>
384 static void MapVector(const TMapFunc mapFunc,
385 const TVector<TInputType>& inputs,
386 TVector<TOutputType>* mappedInputs
387 ) {
388 mappedInputs->yresize(inputs.ysize());
389 NPar::ParallelFor(
390 0,
391 inputs.ysize(),
392 [&] (int inputIdx) {
393 mapFunc(inputs[inputIdx], &(*mappedInputs)[inputIdx]);
394 });
395 }
396
397 template <typename TMapFunc, typename TStatsType>
398 static void MapCandidateList(

Callers 2

MapCandidateListFunction · 0.85
DoMapMethod · 0.85

Calls 3

ParallelForFunction · 0.85
yresizeMethod · 0.80
ysizeMethod · 0.45

Tested by

no test coverage detected