| 486 | } |
| 487 | |
| 488 | static void GetRawTargetSubset( |
| 489 | const TRawTarget& src, |
| 490 | const TArraySubsetIndexing<ui32>& subset, |
| 491 | NPar::ILocalExecutor* localExecutor, |
| 492 | TRawTarget* dst |
| 493 | ) { |
| 494 | if (const ITypedSequencePtr<float>* srcTypedSequence = std::get_if<ITypedSequencePtr<float>>(&src)) { |
| 495 | ITypedArraySubsetPtr<float> typedArraySubset = (*srcTypedSequence)->GetSubset(&subset); |
| 496 | TVector<float> dstData; |
| 497 | dstData.yresize(subset.Size()); |
| 498 | TArrayRef<float> dstDataRef = dstData; |
| 499 | typedArraySubset->ParallelForEach( |
| 500 | [dstDataRef] (ui32 idx, float value) { dstDataRef[idx] = value; }, |
| 501 | localExecutor |
| 502 | ); |
| 503 | (*dst) = (ITypedSequencePtr<float>)MakeIntrusive<TTypeCastArrayHolder<float, float>>( |
| 504 | std::move(dstData) |
| 505 | ); |
| 506 | } else { |
| 507 | (*dst) = GetSubset<TString>(std::get<TVector<TString>>(src), subset, localExecutor); |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | |
| 512 | static void GetMultidimBaselineSubset( |