MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / Range

Method Range

parallel/parallelvvector.cpp:459–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457
458 template < class SCAL >
459 AutoVector S_ParallelBaseVectorPtr<SCAL> :: Range (T_Range<size_t> range) const
460 {
461 /*
462 Version 1:
463 A ParallelFlatVector
464 + possible to cumulate / distribue by its own (???)
465 - requies Range of pardofs, expensive ?
466 .... will provide method Range (range, pardofs)
467 */
468
469 shared_ptr<ParallelDofs> sub_pardofs;
470 if (paralleldofs)
471 sub_pardofs = paralleldofs->Range(range);
472
473 AutoVector locvec = S_BaseVectorPtr<SCAL>::Range (range);
474 auto vec = make_unique<S_ParallelBaseVectorPtr<SCAL>> (range.Size(),
475 this->EntrySizeScal(),
476 locvec.Memory(),
477 sub_pardofs,
478 this->GetParallelStatus());
479
480 return std::move(vec);
481
482 /*
483 Version 2:
484 Has pointer to original vector + Range
485 - cumulate/distribute acts on original vector -> expensive
486 */
487
488 // return make_unique<ParallelRangeVector> (this, range);
489 }
490
491
492 template < class SCAL >

Callers

nothing calls this directly

Calls 7

MemoryMethod · 0.80
GetParallelStatusMethod · 0.80
GetParallelDofsMethod · 0.80
RangeFunction · 0.50
RangeMethod · 0.45
SizeMethod · 0.45
EntrySizeScalMethod · 0.45

Tested by

no test coverage detected