| 1409 | |
| 1410 | |
| 1411 | std::list<std::tuple<std::string,double>> FESpace :: Timing () const |
| 1412 | { |
| 1413 | double time; |
| 1414 | std::list<std::tuple<std::string,double>> results; |
| 1415 | LocalHeap lh (100000, "FESpace - Timing"); |
| 1416 | |
| 1417 | time = RunTiming([&]() { |
| 1418 | ParallelForRange( IntRange(ma->GetNE()), [&] ( IntRange r ) |
| 1419 | { |
| 1420 | LocalHeap &clh = lh, lh = clh.Split(); |
| 1421 | Array<int> dnums; |
| 1422 | for (int i : r) |
| 1423 | GetDofNrs (ElementId(VOL,i), dnums); |
| 1424 | }); |
| 1425 | }); |
| 1426 | results.push_back(std::make_tuple<std::string,double>("GetDofNrs",1e9*time / (ma->GetNE()))); |
| 1427 | |
| 1428 | time = RunTiming([&]() { |
| 1429 | ParallelForRange( IntRange(ma->GetNE()), [&] ( IntRange r ) |
| 1430 | { |
| 1431 | LocalHeap &clh = lh, lh = clh.Split(); |
| 1432 | |
| 1433 | for (int i : r) |
| 1434 | { |
| 1435 | HeapReset hr(lh); |
| 1436 | GetFE (ElementId(VOL,i), lh); |
| 1437 | } |
| 1438 | }); |
| 1439 | }); |
| 1440 | results.push_back(std::make_tuple<std::string,double>("GetFE",1e9 * time / (ma->GetNE()))); |
| 1441 | |
| 1442 | time = RunTiming([&]() { |
| 1443 | ParallelFor( IntRange(ma->GetNE()), [&] (size_t i) |
| 1444 | { |
| 1445 | /* Ng_Element ngel = */ ma->GetElement(ElementId(VOL,i)); |
| 1446 | }); |
| 1447 | }); |
| 1448 | results.push_back(std::make_tuple<std::string,double>("Get Ng_Element", 1e9 * time / (ma->GetNE()))); |
| 1449 | |
| 1450 | |
| 1451 | time = RunTiming([&]() { |
| 1452 | ParallelForRange( IntRange(ma->GetNE()), [&] ( IntRange r ) |
| 1453 | { |
| 1454 | LocalHeap &clh = lh, lh = clh.Split(); |
| 1455 | for (int i : r) |
| 1456 | { |
| 1457 | HeapReset hr(lh); |
| 1458 | /* ElementTransformation & trafo = */ ma->GetTrafo(ElementId(VOL, i), lh); |
| 1459 | } |
| 1460 | }); |
| 1461 | }); |
| 1462 | results.push_back(std::make_tuple<std::string,double>("GetTrafo", 1e9 * time / (ma->GetNE()))); |
| 1463 | |
| 1464 | |
| 1465 | Array<int> global(GetNDof()); |
| 1466 | global = 0; |
| 1467 | time = RunTiming([&]() { |
| 1468 | ParallelForRange( IntRange(ma->GetNE()), [&] ( IntRange r ) |