Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_Details_KokkosCounter.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10// clang-format off
11#ifndef TPETRA_DETAILS_KOKKOS_COUNTER_HPP
12#define TPETRA_DETAILS_KOKKOS_COUNTER_HPP
13
17
18#include <string>
19#include <Teuchos_FancyOStream.hpp>
20
21namespace Tpetra {
22namespace Details {
23
25namespace DeepCopyCounter {
27 void start();
28
30 void reset();
31
33 void stop();
34
36 size_t get_count_same_space();
37
40
41}
42
44namespace FenceCounter {
46 void start();
47
49 void reset();
50
52 void stop();
53
55 size_t get_count_instance(const std::string & device);
56
58 size_t get_count_global(const std::string & device);
59}
60
61// clang-format on
62
66void start();
67
69void reset();
70
72void stop();
73
75size_t get_count_region_contains(const std::string &substr);
76
78void dump_regions(std::ostream &os);
79void dump_regions(Teuchos::FancyOStream &os);
80} // namespace KokkosRegionCounter
81
82// clang-format off
83
84
85
86} // namespace Details
87} // namespace Tpetra
88
89#endif // TPETRA_DETAILS_KOKKOS_COUNTER_HPP
Counter for Kokkos::deep_copy calls.
size_t get_count_different_space()
Query the deep_copy counter for copies between different spaces.
size_t get_count_same_space()
Query the deep_copy counter for copies in the same space.
void stop()
Stop the deep_copy counter.
void start()
Start the deep_copy counter.
void reset()
Reset the deep_copy counter.
Counter for Kokkos::fence calls.
size_t get_count_instance(const std::string &device)
Query the fence counter for given device, for an exec_space_instance.fence().
size_t get_count_global(const std::string &device)
Query the fence counter for given device, for an Kokkos::fence().
Counter for Kokkos regions representing third-party library usage.
void dump_regions(std::ostream &os)
Print all observed region labels, separated by newline.
size_t get_count_region_contains(const std::string &substr)
How many regions containing substr have been seen.
Nonmember function that computes a residual Computes R = B - A * X.
Namespace Tpetra contains the class and methods constituting the Tpetra library.