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#ifndef TPETRA_DETAILS_KOKKOS_COUNTER_HPP
11#define TPETRA_DETAILS_KOKKOS_COUNTER_HPP
12
16
17#include <string>
18#include <Teuchos_FancyOStream.hpp>
19
20namespace Tpetra {
21namespace Details {
22
24namespace DeepCopyCounter {
26void start();
27
29void reset();
30
32void stop();
33
36
39
40} // namespace DeepCopyCounter
41
43namespace FenceCounter {
45void start();
46
48void reset();
49
51void stop();
52
54size_t get_count_instance(const std::string &device);
55
57size_t get_count_global(const std::string &device);
58} // namespace FenceCounter
59
61namespace KokkosRegionCounter {
63void start();
64
66void reset();
67
69void stop();
70
72size_t get_count_region_contains(const std::string &substr);
73
75void dump_regions(std::ostream &os);
76void dump_regions(Teuchos::FancyOStream &os);
77} // namespace KokkosRegionCounter
78
79} // namespace Details
80} // namespace Tpetra
81
82#endif // TPETRA_DETAILS_KOKKOS_COUNTER_HPP
Struct that holds views of the contents of a CrsMatrix.
Implementation details of Tpetra.
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.
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()
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.
Namespace Tpetra contains the class and methods constituting the Tpetra library.