| 593 | |
| 594 | |
| 595 | struct TPackedBinaryFeaturesData { |
| 596 | // lookups |
| 597 | TVector<TMaybe<TPackedBinaryIndex>> FlatFeatureIndexToPackedBinaryIndex; // [flatFeatureIdx] |
| 598 | TVector<TFeatureIdxWithType> PackedBinaryToSrcIndex; // [linearPackedBinaryIndex] |
| 599 | |
| 600 | TVector<THolder<IBinaryPacksArray>> SrcData; // [packIdx][objectIdx][bitIdx] |
| 601 | |
| 602 | public: |
| 603 | TPackedBinaryFeaturesData() = default; |
| 604 | |
| 605 | // does not init data in SrcData elements, it has to be filled later if necessary |
| 606 | TPackedBinaryFeaturesData( |
| 607 | const TFeaturesLayout& featuresLayout, |
| 608 | const TQuantizedFeaturesInfo& quantizedFeaturesInfo, |
| 609 | const TExclusiveFeatureBundlesData& exclusiveFeatureBundlesData, |
| 610 | bool dontPack = false // set true to disable binary features packing |
| 611 | ); |
| 612 | |
| 613 | // Execute tasks added to resourceConstrainedExecutor to complete GetSubset operation |
| 614 | void GetSubsetWithScheduling( |
| 615 | const TFeaturesArraySubsetIndexing* subsetIndexing, |
| 616 | |
| 617 | // needed only for sparse features |
| 618 | const TMaybe<TFeaturesArraySubsetInvertedIndexing>& subsetInvertedIndexing, |
| 619 | TResourceConstrainedExecutor* resourceConstrainedExecutor, |
| 620 | TPackedBinaryFeaturesData* subsetData |
| 621 | ) const; |
| 622 | |
| 623 | void Save(NPar::ILocalExecutor* localExecutor, IBinSaver* binSaver) const; |
| 624 | void Load(const TArraySubsetIndexing<ui32>* subsetIndexing, IBinSaver* binSaver); |
| 625 | }; |
| 626 | |
| 627 | // for use while building and storing this part in TQuantizedObjectsDataProvider |
| 628 | struct TQuantizedObjectsData : public TMoveOnly { |
no outgoing calls