PX4 Firmware
PX4 Autopilot Software http://px4.io
test_microbench_matrix.cpp File Reference

Tests for the microbench matrix math library. More...

#include <unit_test.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <drivers/drv_hrt.h>
#include <perf/perf_counter.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/micro_hal.h>
#include <matrix/math.hpp>
Include dependency graph for test_microbench_matrix.cpp:

Go to the source code of this file.

Classes

class  MicroBenchMatrix::MicroBenchMatrix
 

Namespaces

 MicroBenchMatrix
 

Macros

#define PERF(name, op, count)
 

Functions

void MicroBenchMatrix::lock ()
 
void MicroBenchMatrix::unlock ()
 
template<typename T >
MicroBenchMatrix::random (T min, T max)
 
 MicroBenchMatrix::ut_declare_test_c (test_microbench_matrix, MicroBenchMatrix) bool MicroBenchMatrix
 

Detailed Description

Tests for the microbench matrix math library.

Definition in file test_microbench_matrix.cpp.

Macro Definition Documentation

◆ PERF

#define PERF (   name,
  op,
  count 
)
Value:
do { \
px4_usleep(1000); \
reset(); \
perf_counter_t p = perf_alloc(PC_ELAPSED, name); \
for (int i = 0; i < count; i++) { \
lock(); \
perf_begin(p); \
op; \
perf_end(p); \
unlock(); \
reset(); \
} \
perf_print_counter(p); \
perf_free(p); \
} while (0)
measure the time elapsed performing an event
Definition: perf_counter.h:56
#define perf_alloc(a, b)
Definition: px4io.h:59
const char * name
Definition: tests_main.c:58

Definition at line 74 of file test_microbench_matrix.cpp.

Referenced by MicroBenchMatrix::ut_declare_test_c().