| 574 | |
| 575 | template <typename TValueType> |
| 576 | static 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 | |
| 600 | void ComputeOnlineCTRs( |
no test coverage detected