AP_Math: benchmarks: define hal

This commit is contained in:
Iampete1 2021-11-21 01:53:19 +00:00 committed by Andrew Tridgell
parent 97602aadf5
commit 9ec8bb17b2
2 changed files with 4 additions and 0 deletions

View File

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

View File

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