Browse Source

AP_Math: benchmarks: define hal

apm_2208
Iampete1 3 years ago committed by Andrew Tridgell
parent
commit
9ec8bb17b2
  1. 2
      libraries/AP_Math/benchmarks/benchmark_geodesic_grid.cpp
  2. 2
      libraries/AP_Math/benchmarks/benchmark_matrix.cpp

2
libraries/AP_Math/benchmarks/benchmark_geodesic_grid.cpp

@ -18,6 +18,8 @@
#include <AP_Math/AP_GeodesicGrid.h> #include <AP_Math/AP_GeodesicGrid.h>
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
static const Vector3f triangles[20][3] = { static const Vector3f triangles[20][3] = {
{{-M_GOLDEN, 1, 0}, {-1, 0,-M_GOLDEN}, {-M_GOLDEN,-1, 0}}, {{-M_GOLDEN, 1, 0}, {-1, 0,-M_GOLDEN}, {-M_GOLDEN,-1, 0}},
{{-1, 0,-M_GOLDEN}, {-M_GOLDEN,-1, 0}, { 0,-M_GOLDEN,-1}}, {{-1, 0,-M_GOLDEN}, {-M_GOLDEN,-1, 0}, { 0,-M_GOLDEN,-1}},

2
libraries/AP_Math/benchmarks/benchmark_matrix.cpp

@ -2,6 +2,8 @@
#include <AP_Math/AP_Math.h> #include <AP_Math/AP_Math.h>
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
static void BM_MatrixMultiplication(benchmark::State& state) static void BM_MatrixMultiplication(benchmark::State& state)
{ {
Matrix3f m1(Vector3f(1.0f, 2.0f, 3.0f), Matrix3f m1(Vector3f(1.0f, 2.0f, 3.0f),

Loading…
Cancel
Save