#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <vector>
#include "benchmark/benchmark.h"
#include "output_test.h"
Go to the source code of this file.
|
| ADD_COMPLEXITY_CASES (big_o_1_test_name, rms_o_1_test_name, auto_big_o_1) |
|
| ADD_COMPLEXITY_CASES (big_o_1_test_name, rms_o_1_test_name, enum_big_o_1) |
|
| ADD_COMPLEXITY_CASES (big_o_1_test_name, rms_o_1_test_name, lambda_big_o_1) |
|
| ADD_COMPLEXITY_CASES (big_o_n_lg_n_test_name, rms_o_n_lg_n_test_name, enum_auto_big_o_n_lg_n) |
|
| ADD_COMPLEXITY_CASES (big_o_n_lg_n_test_name, rms_o_n_lg_n_test_name, lambda_big_o_n_lg_n) |
|
| ADD_COMPLEXITY_CASES (big_o_n_test_name, rms_o_n_test_name, enum_auto_big_o_n) |
|
| ADD_COMPLEXITY_CASES (big_o_n_test_name, rms_o_n_test_name, lambda_big_o_n) |
|
| BENCHMARK (BM_Complexity_O1) -> Range(1, 1<< 18) ->Complexity(benchmark::o1) |
|
void | BM_Complexity_O1 (benchmark::State &state) |
|
void | BM_Complexity_O_N (benchmark::State &state) |
|
static void | BM_Complexity_O_N_log_N (benchmark::State &state) |
|
std::vector< int > | ConstructRandomVector (int size) |
|
int | main (int argc, char *argv[]) |
|
| RangeMultiplier (2) -> Range(1<< 10, 1<< 16) ->Complexity(benchmark::oN) |
|
◆ ADD_COMPLEXITY_CASES
#define ADD_COMPLEXITY_CASES |
( |
|
... | ) |
int CONCAT(dummy, __LINE__) = AddComplexityTest(__VA_ARGS__) |
◆ ADD_COMPLEXITY_CASES() [1/7]
◆ ADD_COMPLEXITY_CASES() [2/7]
◆ ADD_COMPLEXITY_CASES() [3/7]
◆ ADD_COMPLEXITY_CASES() [4/7]
◆ ADD_COMPLEXITY_CASES() [5/7]
◆ ADD_COMPLEXITY_CASES() [6/7]
◆ ADD_COMPLEXITY_CASES() [7/7]
◆ BENCHMARK()
◆ BM_Complexity_O1()
◆ BM_Complexity_O_N()
◆ BM_Complexity_O_N_log_N()
◆ ConstructRandomVector()
std::vector<int> ConstructRandomVector |
( |
int |
size | ) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ RangeMultiplier()
◆ auto_big_o_1
const char* auto_big_o_1 = "(\\([0-9]+\\))|(lgN)" |
◆ big_o_1_test_name
const char* big_o_1_test_name = "BM_Complexity_O1_BigO" |
◆ big_o_n_lg_n_test_name
const char* big_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_BigO" |
◆ big_o_n_test_name
const char* big_o_n_test_name = "BM_Complexity_O_N_BigO" |
◆ enum_auto_big_o_n
const char* enum_auto_big_o_n = "N" |
◆ enum_auto_big_o_n_lg_n
const char* enum_auto_big_o_n_lg_n = "NlgN" |
◆ enum_big_o_1
const char* enum_big_o_1 = "\\([0-9]+\\)" |
◆ lambda_big_o_1
const char* lambda_big_o_1 = "f\\(N\\)" |
◆ lambda_big_o_n
const char* lambda_big_o_n = "f\\(N\\)" |
◆ lambda_big_o_n_lg_n
const char* lambda_big_o_n_lg_n = "f\\(N\\)" |
◆ rms_o_1_test_name
const char* rms_o_1_test_name = "BM_Complexity_O1_RMS" |
◆ rms_o_n_lg_n_test_name
const char* rms_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_RMS" |
◆ rms_o_n_test_name
const char* rms_o_n_test_name = "BM_Complexity_O_N_RMS" |