DGtal
1.5.beta
|
#include <iostream>
#include <benchmark/benchmark.h>
#include <unordered_set>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/domains/CDomainArchetype.h"
#include "DGtal/kernel/sets/DigitalSetBySTLVector.h"
#include "DGtal/kernel/sets/DigitalSetBySTLSet.h"
#include "DGtal/kernel/sets/DigitalSetByAssociativeContainer.h"
#include "DGtal/kernel/sets/DigitalSetFromMap.h"
#include "DGtal/kernel/PointHashFunctions.h"
#include "DGtal/helpers/StdDefs.h"
#include <map>
#include <string>
Go to the source code of this file.
Typedefs | |
typedef DGtal::DigitalSetBySTLSet< Z2i::Domain > | FromSet |
typedef DGtal::DigitalSetBySTLVector< Z2i::Domain > | FromVector |
typedef DGtal::DigitalSetByAssociativeContainer< Z2i::Domain, std::unordered_set< Z2i::Point > > | FromUnordered |
typedef DGtal::DigitalSetBySTLSet< Z3i::Domain > | FromSet3 |
typedef DGtal::DigitalSetBySTLVector< Z3i::Domain > | FromVector3 |
typedef DGtal::DigitalSetByAssociativeContainer< Z3i::Domain, std::unordered_set< Z3i::Point > > | FromUnordered3 |
Functions | |
template<typename Q > | |
static void | BM_Constructor (benchmark::State &state) |
BENCHMARK_TEMPLATE (BM_Constructor, FromVector) -> Range(1<< 3, 1<< 8) | |
BENCHMARK_TEMPLATE (BM_Constructor, FromSet) -> Range(1<< 3, 1<< 8) | |
BENCHMARK_TEMPLATE (BM_Constructor, FromUnordered) -> Range(1<< 3, 1<< 8) | |
template<typename Q > | |
static void | BM_insert (benchmark::State &state) |
BENCHMARK_TEMPLATE (BM_insert, FromVector) | |
BENCHMARK_TEMPLATE (BM_insert, FromSet) | |
BENCHMARK_TEMPLATE (BM_insert, FromUnordered) | |
template<typename Q > | |
static void | BM_iterate (benchmark::State &state) |
BENCHMARK_TEMPLATE (BM_iterate, FromVector) -> Range(1<< 3, 1<< 10) | |
BENCHMARK_TEMPLATE (BM_iterate, FromSet) -> Range(1<< 3, 1<< 10) | |
BENCHMARK_TEMPLATE (BM_iterate, FromUnordered) -> Range(1<< 3, 1<< 10) | |
int | main (int argc, char **argv) |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Functions for benchmarking digitalset containers.
This file is part of the DGtal library.
Definition in file benchmarkSetContainer.cpp.
typedef DGtal::DigitalSetBySTLSet< Z2i::Domain> FromSet |
Definition at line 54 of file benchmarkSetContainer.cpp.
typedef DGtal::DigitalSetBySTLSet< Z3i::Domain> FromSet3 |
Definition at line 58 of file benchmarkSetContainer.cpp.
typedef DGtal::DigitalSetByAssociativeContainer< Z2i::Domain, std::unordered_set<Z2i::Point> > FromUnordered |
Definition at line 56 of file benchmarkSetContainer.cpp.
typedef DGtal::DigitalSetByAssociativeContainer< Z3i::Domain, std::unordered_set<Z3i::Point> > FromUnordered3 |
Definition at line 60 of file benchmarkSetContainer.cpp.
Definition at line 55 of file benchmarkSetContainer.cpp.
Definition at line 59 of file benchmarkSetContainer.cpp.
BENCHMARK_TEMPLATE | ( | BM_Constructor | , |
FromSet | |||
) | -> Range(1<< 3, 1<< 8) |
BENCHMARK_TEMPLATE | ( | BM_Constructor | , |
FromUnordered | |||
) | -> Range(1<< 3, 1<< 8) |
BENCHMARK_TEMPLATE | ( | BM_Constructor | , |
FromVector | |||
) | -> Range(1<< 3, 1<< 8) |
BENCHMARK_TEMPLATE | ( | BM_insert | , |
FromUnordered | |||
) |
BENCHMARK_TEMPLATE | ( | BM_insert | , |
FromVector | |||
) |
BENCHMARK_TEMPLATE | ( | BM_iterate | , |
FromSet | |||
) | -> Range(1<< 3, 1<< 10) |
BENCHMARK_TEMPLATE | ( | BM_iterate | , |
FromUnordered | |||
) | -> Range(1<< 3, 1<< 10) |
BENCHMARK_TEMPLATE | ( | BM_iterate | , |
FromVector | |||
) | -> Range(1<< 3, 1<< 10) |
|
static |
Definition at line 63 of file benchmarkSetContainer.cpp.
References image().
|
static |
Definition at line 83 of file benchmarkSetContainer.cpp.
|
static |
Definition at line 107 of file benchmarkSetContainer.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 135 of file benchmarkSetContainer.cpp.