DOLFINx 0.10.0.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
timing.h
1// Copyright (C) 2005-2010 Anders Logg, 2015 Jan Blechta
2//
3// This file is part of DOLFINx (https://www.fenicsproject.org)
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8
9#include "Table.h"
10#include <chrono>
11#include <map>
12#include <mpi.h>
13#include <string>
14#include <utility>
15
16namespace dolfinx
17{
20Table timing_table();
21
28void list_timings(MPI_Comm comm,
29 Table::Reduction reduction = Table::Reduction::max);
30
34std::pair<int, std::chrono::duration<double, std::ratio<1>>>
35timing(std::string task);
36
39std::map<std::string,
40 std::pair<int, std::chrono::duration<double, std::ratio<1>>>>
41timings();
42
43} // namespace dolfinx
Reduction
Definition Table.h:33
Top-level namespace.
Definition defines.h:12
void list_timings(MPI_Comm comm, Table::Reduction reduction=Table::Reduction::max)
List a summary of timings and tasks.
Definition timing.cpp:18
std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > timing(std::string task)
Return timing (count, total wall time) for given task.
Definition timing.cpp:24
Table timing_table()
Return a summary of timings and tasks in a Table.
Definition timing.cpp:13
std::map< std::string, std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > > timings()
Logged elapsed times.
Definition timing.cpp:31