ZLayout EDA Library v1.0.0
Advanced Electronic Design Automation Layout Library with Bilingual Documentation
Loading...
Searching...
No Matches
bench_geometry.cpp File Reference

Benchmark tests for geometry operations performance. More...

#include <benchmark/benchmark.h>
#include <zlayout/geometry/polygon.hpp>
#include <zlayout/geometry/point.hpp>
#include <zlayout/geometry/rectangle.hpp>
#include <random>
#include <vector>
#include <cmath>
Include dependency graph for bench_geometry.cpp:

Go to the source code of this file.

Macros

#define _USE_MATH_DEFINES
#define M_PI   3.14159265358979323846

Functions

static void BM_PolygonArea (benchmark::State &state)
 BENCHMARK (BM_PolygonArea) -> Range(8, 8<< 8) ->Complexity()
static void BM_PointInPolygon (benchmark::State &state)
 BENCHMARK (BM_PointInPolygon)
static void BM_SharpAngleDetection (benchmark::State &state)
 BENCHMARK (BM_SharpAngleDetection) -> Range(8, 8<< 6) ->Complexity()
static void BM_PolygonDistance (benchmark::State &state)
 BENCHMARK (BM_PolygonDistance)
 BENCHMARK_MAIN ()

Detailed Description

Benchmark tests for geometry operations performance.

Definition in file bench_geometry.cpp.

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 6 of file bench_geometry.cpp.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 17 of file bench_geometry.cpp.

Function Documentation

◆ BENCHMARK() [1/4]

BENCHMARK ( BM_PointInPolygon )
Here is the call graph for this function:

◆ BENCHMARK() [2/4]

BENCHMARK ( BM_PolygonArea ) -> Range(8, 8<< 8) ->Complexity()
Here is the call graph for this function:

◆ BENCHMARK() [3/4]

BENCHMARK ( BM_PolygonDistance )
Here is the call graph for this function:

◆ BENCHMARK() [4/4]

BENCHMARK ( BM_SharpAngleDetection ) -> Range(8, 8<< 6) ->Complexity()
Here is the call graph for this function:

◆ BENCHMARK_MAIN()

BENCHMARK_MAIN ( )

◆ BM_PointInPolygon()

void BM_PointInPolygon ( benchmark::State & state)
static

Definition at line 42 of file bench_geometry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BM_PolygonArea()

void BM_PolygonArea ( benchmark::State & state)
static

Definition at line 23 of file bench_geometry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BM_PolygonDistance()

void BM_PolygonDistance ( benchmark::State & state)
static

Definition at line 86 of file bench_geometry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BM_SharpAngleDetection()

void BM_SharpAngleDetection ( benchmark::State & state)
static

Definition at line 64 of file bench_geometry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: