aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/mm/common.h
diff options
context:
space:
mode:
authorYunsup Lee <yunsup@cs.berkeley.edu>2014-04-14 22:46:46 -0700
committerYunsup Lee <yunsup@cs.berkeley.edu>2014-04-14 22:46:46 -0700
commitf4203e9e56f882af52960d15b98ab881712f776d (patch)
treeff67ecb4da6f1d3decb5faad273aea6bbf6d00ee /benchmarks/mm/common.h
parentc31d7c5eb4109fdcce58d27b132e20596ece2d07 (diff)
downloadriscv-tests-eos20-bringup.zip
riscv-tests-eos20-bringup.tar.gz
riscv-tests-eos20-bringup.tar.bz2
add mm benchmark for eos20eos20-bringup
Diffstat (limited to 'benchmarks/mm/common.h')
-rw-r--r--benchmarks/mm/common.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/benchmarks/mm/common.h b/benchmarks/mm/common.h
new file mode 100644
index 0000000..f0e6709
--- /dev/null
+++ b/benchmarks/mm/common.h
@@ -0,0 +1,35 @@
+#ifndef _MM_H
+#define _MM_H
+
+#include <string.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef SP
+typedef float t;
+#define fma fmaf
+#else
+typedef double t;
+#endif
+
+#define inline inline __attribute__((always_inline))
+
+#define alloca_aligned(s, a) ((void*)(((uintptr_t)alloca((s)+(a)-1)+(a)-1)&~((a)-1)))
+
+#include "rb.h"
+#include "hwacha.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void mm(size_t m, size_t n, size_t p,
+ t* a, size_t lda, t* b, size_t ldb, t* c, size_t ldc);
+
+#ifdef __cplusplus
+}
+#endif
+
+//void rb(t* a, t* b, t* c, size_t lda, size_t ldb, size_t ldc);
+
+#endif