Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
numerics
src
Teuchos_Flops.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Teuchos: Common Tools Package
4
//
5
// Copyright 2004 NTESS and the Teuchos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
// Kris
11
// 07.08.03 -- Move into Teuchos package/namespace
12
13
#ifndef TEUCHOS_FLOPS_HPP
14
#define TEUCHOS_FLOPS_HPP
15
21
31
32
namespace
Teuchos
33
{
34
class
Flops
35
{
36
public
:
37
39
40
42
46
Flops
();
47
49
51
Flops
(
const
Flops
&
flops
);
52
54
56
virtual
~Flops
();
57
59
61
62
64
double
flops
()
const
{
return
flops_; }
65
67
69
70
72
void
resetFlops
() {flops_ = 0.0;}
73
75
76
friend
class
CompObject
;
77
78
protected
:
79
80
mutable
double
flops_;
81
83
84
85
void
updateFlops
(
int
addflops)
const
{flops_ += (double) addflops; }
86
88
void
updateFlops
(
long
int
addflops)
const
{flops_ += (double) addflops; }
89
91
void
updateFlops
(
double
addflops)
const
{flops_ += (double) addflops; }
92
94
void
updateFlops
(
float
addflops)
const
{flops_ += (double) addflops; }
95
97
98
private
:
99
100
};
101
102
// #include "Teuchos_Flops.cpp"
103
104
}
// namespace Teuchos
105
106
#endif
// end of TEUCHOS_FLOPS_HPP
Teuchos::CompObject
Functionality and data that is common to all computational classes.
Definition
Teuchos_CompObject.hpp:34
Teuchos::Flops::~Flops
virtual ~Flops()
Destructor.
Definition
Teuchos_Flops.cpp:28
Teuchos::Flops::flops
double flops() const
Returns the number of floating point operations with this object and resets the count.
Definition
Teuchos_Flops.hpp:64
Teuchos::Flops::Flops
Flops()
Default Constructor.
Definition
Teuchos_Flops.cpp:18
Teuchos::Flops::updateFlops
void updateFlops(int addflops) const
Increment Flop count for this object from an int.
Definition
Teuchos_Flops.hpp:85
Teuchos::Flops::updateFlops
void updateFlops(long int addflops) const
Increment Flop count for this object from a long int.
Definition
Teuchos_Flops.hpp:88
Teuchos::Flops::updateFlops
void updateFlops(float addflops) const
Increment Flop count for this object from a float.
Definition
Teuchos_Flops.hpp:94
Teuchos::Flops::updateFlops
void updateFlops(double addflops) const
Increment Flop count for this object from a double.
Definition
Teuchos_Flops.hpp:91
Teuchos::Flops::resetFlops
void resetFlops()
Resets the number of floating point operations to zero for this multi-stdvector.
Definition
Teuchos_Flops.hpp:72
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0