aboutsummaryrefslogtreecommitdiff
path: root/Client/ThirdParty/libfixmath/benchmarks/interface.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-11-30 22:25:37 +0800
committerchai <chaifix@163.com>2021-11-30 22:25:37 +0800
commit9e0e01b7f4375063f06e494113187d48614628e0 (patch)
tree21a4901612ad92c121f4c887a33b1bbbe87c6b00 /Client/ThirdParty/libfixmath/benchmarks/interface.h
+init
Diffstat (limited to 'Client/ThirdParty/libfixmath/benchmarks/interface.h')
-rw-r--r--Client/ThirdParty/libfixmath/benchmarks/interface.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/Client/ThirdParty/libfixmath/benchmarks/interface.h b/Client/ThirdParty/libfixmath/benchmarks/interface.h
new file mode 100644
index 0000000..cf6a3f9
--- /dev/null
+++ b/Client/ThirdParty/libfixmath/benchmarks/interface.h
@@ -0,0 +1,27 @@
+// This file defines the hardware or simulator interface that will be used to
+// measure timings and report results.
+
+#include <stdint.h>
+
+/* Tools for profiling */
+
+typedef struct {
+ uint32_t min;
+ uint32_t max;
+ uint32_t sum;
+ uint32_t count;
+} cyclecount_t;
+
+// Initialize
+void interface_init();
+
+// Reset timer/counter/something
+void start_timing();
+
+// Return the number of clock cycles passed since start_timing();
+uint16_t end_timing();
+
+// Print a value to console, along with a descriptive label
+void print_value(const char *label, int32_t value);
+
+void print(const char *label, cyclecount_t *count);