MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / SFCProcessorMap

Method SFCProcessorMap

Src/Base/AMReX_DistributionMapping.cpp:1479–1504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1477}
1478
1479void
1480DistributionMapping::SFCProcessorMap (const BoxArray& boxes, int nprocs)
1481{
1482 BL_ASSERT( ! boxes.empty());
1483
1484 m_ref->clear();
1485 m_ref->m_pmap.resize(boxes.size());
1486
1487 if (boxes.size() < Long(sfc_threshold)*nprocs)
1488 {
1489 KnapSackProcessorMap(boxes,nprocs);
1490 }
1491 else
1492 {
1493 std::vector<Long> wgts;
1494
1495 wgts.reserve(boxes.size());
1496
1497 for (int i = 0, N = static_cast<int>(boxes.size()); i < N; ++i)
1498 {
1499 wgts.push_back(boxes[i].numPts());
1500 }
1501
1502 SFCProcessorMapDoIt(boxes,wgts,nprocs);
1503 }
1504}
1505
1506void
1507DistributionMapping::SFCProcessorMap (const BoxArray& boxes,

Callers 1

makeSFCMethod · 0.80

Calls 8

LongFunction · 0.85
emptyMethod · 0.45
clearMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
numPtsMethod · 0.45

Tested by

no test coverage detected