alpaqa
1.0.0a8
Nonconvex constrained optimization
Loading...
Searching...
No Matches
alpaqa
include
alpaqa
util
timed.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <chrono>
4
5
namespace
alpaqa::util
{
6
template
<
class
T>
7
struct
Timed
{
8
Timed
(T &
time
) :
time
(
time
) {
9
time
-= std::chrono::steady_clock::now().time_since_epoch();
10
}
11
~Timed
() {
time
+= std::chrono::steady_clock::now().time_since_epoch(); }
12
Timed
(
const
Timed
&) =
delete
;
13
Timed
(
Timed
&&) =
delete
;
14
Timed
&
operator=
(
const
Timed
&) =
delete
;
15
Timed
&
operator=
(
Timed
&&) =
delete
;
16
T &
time
;
17
};
18
#ifndef DOXYGEN
19
template
<
class
T>
20
Timed
(T &) ->
Timed<T>
;
21
#endif
22
}
// namespace alpaqa::util
alpaqa::util
Definition:
check-dim.hpp:8
alpaqa::util::Timed
Definition:
timed.hpp:7
alpaqa::util::Timed::Timed
Timed(Timed &&)=delete
alpaqa::util::Timed::Timed
Timed(const Timed &)=delete
alpaqa::util::Timed::operator=
Timed & operator=(Timed &&)=delete
alpaqa::util::Timed::operator=
Timed & operator=(const Timed &)=delete
alpaqa::util::Timed::~Timed
~Timed()
Definition:
timed.hpp:11
alpaqa::util::Timed::Timed
Timed(T &time)
Definition:
timed.hpp:8
alpaqa::util::Timed::time
T & time
Definition:
timed.hpp:16
Generated by
1.9.6