minor mt updates
[riscv-tests.git] / benchmarks / mm / common.h
1 #ifndef _MM_H
2 #define _MM_H
3
4 #include <string.h>
5 #include <stdint.h>
6 #include <math.h>
7
8 #ifdef SP
9 typedef float t;
10 #define fma fmaf
11 #else
12 typedef double t;
13 #endif
14
15 #define inline inline __attribute__((always_inline))
16
17 #define alloca_aligned(s, a) ((void*)(((uintptr_t)alloca((s)+(a)-1)+(a)-1)&~((a)-1)))
18
19 #include "rb.h"
20 #include "hwacha.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 void mm(size_t m, size_t n, size_t p,
27 t* a, size_t lda, t* b, size_t ldb, t* c, size_t ldc);
28
29 #ifdef __cplusplus
30 }
31 #endif
32
33 //void rb(t* a, t* b, t* c, size_t lda, size_t ldb, size_t ldc);
34
35 #endif