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

Function CopyCatColumnToHash

catboost/private/libs/algo/online_ctr.cpp:576–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574
575template <typename TValueType>
576static void CopyCatColumnToHash(
577 const IQuantizedCatValuesHolder& catColumn,
578 const TFeaturesArraySubsetIndexing& featuresSubsetIndexing,
579 NPar::ILocalExecutor* localExecutor,
580 TValueType* hashArrView
581) {
582 TCloningParams cloningParams;
583 cloningParams.SubsetIndexing = &featuresSubsetIndexing;
584 auto cloned = catColumn.CloneWithNewSubsetIndexing(
585 cloningParams,
586 localExecutor
587 );
588 dynamic_cast<const IQuantizedCatValuesHolder*>(cloned.Get())->ParallelForEachBlock(
589 localExecutor,
590 [hashArrView] (size_t blockStartIdx, auto blockView) {
591 auto hashArrViewPtr = hashArrView + blockStartIdx;
592 for (auto i : xrange(blockView.size())) {
593 hashArrViewPtr[i] = blockView[i] + 1;
594 }
595 },
596 512);
597}
598
599
600void ComputeOnlineCTRs(

Callers 1

ComputeOnlineCTRsFunction · 0.85

Calls 5

xrangeFunction · 0.85
ParallelForEachBlockMethod · 0.80
GetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected