benchmark
1.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
types.h
1
// Copyright 2015 Google Inc. All rights reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef BENCHMARK_TYPES_H_
16
#define BENCHMARK_TYPES_H_
17
18
#include <stdint.h>
19
20
#include <functional>
21
#include <memory>
22
#include <string>
23
24
#include "benchmark/export.h"
25
26
namespace
benchmark {
27
28
namespace
internal {
29
#if (__cplusplus < 201402L || (defined(_MSC_VER) && _MSVC_LANG < 201402L))
30
template
<
typename
T,
typename
... Args>
31
std::unique_ptr<T> make_unique(Args&&... args) {
32
return
std::unique_ptr<T>(
new
T(std::forward<Args>(args)...));
33
}
34
#else
35
using
::std::make_unique;
36
#endif
37
}
// namespace internal
38
39
class
BenchmarkReporter
;
40
class
State
;
41
42
using
IterationCount = int64_t;
43
44
using
callback_function = std::function<void(
const
benchmark::State&)>;
45
46
enum
TimeUnit { kNanosecond, kMicrosecond, kMillisecond, kSecond };
47
48
}
// namespace benchmark
49
50
#endif
// BENCHMARK_TYPES_H_
benchmark::BenchmarkReporter
Definition
reporter.h:56
benchmark::State
Definition
state.h:43
include
benchmark
types.h
Generated by
1.18.0