17 #include <AP_gbenchmark.h> 49 if (section_index >= 80) {
53 unsigned int i = section_index / 4;
54 unsigned int j = section_index % 4;
55 auto& t = triangles[i];
56 Vector3f mt[3]{(t[0] + t[1]) / 2, (t[1] + t[2]) / 2, (t[2] + t[0]) / 2};
87 int section = state.range_x();
90 v = (a + b + c) / 3.0
f;
92 while (state.KeepRunning()) {
94 gbenchmark_escape(&s);
static const Vector3f triangles[20][3]
BENCHMARK(BM_GeodesicGridSections) -> DenseRange(0, 79)
static int section(const Vector3f &v, bool inclusive=false)
static bool section_triangle(unsigned int section_index, Vector3f &a, Vector3f &b, Vector3f &c)
static void BM_GeodesicGridSections(benchmark::State &state)