aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/mm/common.h
blob: f0e670948e141bebbad2f08a9a5925f4bad9959b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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