| 1253 | |
| 1254 | |
| 1255 | static void FillSubsetTargetDataCache( |
| 1256 | const TObjectsGroupingSubset& objectsGroupingSubset, |
| 1257 | NPar::ILocalExecutor* localExecutor, |
| 1258 | TSubsetTargetDataCache* subsetTargetDataCache |
| 1259 | ) { |
| 1260 | TVector<std::function<void()>> tasks; |
| 1261 | |
| 1262 | tasks.emplace_back([&] () { |
| 1263 | FillSubsetTargetDataCacheSubType<TSharedWeights<float>>( |
| 1264 | objectsGroupingSubset, |
| 1265 | GetObjectWeightsSubsetImpl, |
| 1266 | localExecutor, |
| 1267 | &(subsetTargetDataCache->Weights) |
| 1268 | ); |
| 1269 | }); |
| 1270 | |
| 1271 | tasks.emplace_back([&] () { |
| 1272 | FillSubsetTargetDataCacheSubType<TSharedVector<float>>( |
| 1273 | objectsGroupingSubset, |
| 1274 | GetObjectsFloatDataSubsetImpl, |
| 1275 | localExecutor, |
| 1276 | &(subsetTargetDataCache->Targets) |
| 1277 | ); |
| 1278 | }); |
| 1279 | |
| 1280 | tasks.emplace_back([&] () { |
| 1281 | FillSubsetTargetDataCacheSubType<TSharedVector<float>>( |
| 1282 | objectsGroupingSubset, |
| 1283 | GetObjectsFloatDataSubsetImpl, |
| 1284 | localExecutor, |
| 1285 | &(subsetTargetDataCache->Baselines) |
| 1286 | ); |
| 1287 | }); |
| 1288 | |
| 1289 | tasks.emplace_back([&] () { |
| 1290 | FillSubsetTargetDataCacheSubType<TSharedVector<TQueryInfo>>( |
| 1291 | objectsGroupingSubset, |
| 1292 | GetGroupInfosSubsetImpl, |
| 1293 | localExecutor, |
| 1294 | &(subsetTargetDataCache->GroupInfos) |
| 1295 | ); |
| 1296 | }); |
| 1297 | |
| 1298 | ExecuteTasksInParallel(&tasks, localExecutor); |
| 1299 | } |
| 1300 | |
| 1301 | |
| 1302 | TIntrusivePtr<TTargetDataProvider> TTargetDataProvider::GetSubset( |