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

Function AddToCacheAndSaveId

catboost/libs/data/target.cpp:953–963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

951
952template <class TSharedDataPtr>
953inline void AddToCacheAndSaveId(
954 const TSharedDataPtr sharedData,
955 IBinSaver* binSaver,
956 TSerializationTargetSingleTypeDataCache<TSharedDataPtr>* cache
957) {
958 const ui64 id = reinterpret_cast<ui64>(sharedData.Get());
959 SaveMulti(binSaver, id);
960 if (id) {
961 cache->emplace(id, sharedData);
962 }
963}
964
965template <class TSharedDataPtr>
966static void SaveWithCache(

Callers 2

SaveWithCacheFunction · 0.85
SaveMethod · 0.85

Calls 3

SaveMultiFunction · 0.85
GetMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected