forked from UoB-HPC/openmp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mm_utils.h
35 lines (25 loc) · 1.02 KB
/
mm_utils.h
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
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define AVAL 3.0
#define BVAL 5.0
#define TYPE double
//#define TYPE float
#define BIG 10000000.0
#define SMALL 0.00000001
#define TOL 0.001
//#define DEBUG 1
double errsqr(int Ndim, int Mdim, TYPE *C, TYPE *Cref);
void mm_clear(int Ndim, int Mdim, TYPE *C);
void mm_print(int Ndim, int Mdim, TYPE *C);
void init_const_matrix(int Ndim, int Mdim, int Pdim, TYPE *A, TYPE *B, TYPE *C);
void init_progression_matrix(int Ndim, int Mdim, int Pdim, TYPE *A, TYPE *B,
TYPE *C);
void output_results(int Ndim, int Mdim, int Pdim, int nerr, double ave_t,
double min_t, double max_t);
void mm_tst_cases(int NTRIALS, int Ndim, int Mdim, int Pdim, TYPE *A, TYPE *B,
TYPE *C,
void (*mm_func)(int, int, int, TYPE *, TYPE *, TYPE *));
void init_diag_dom_matrix(int Ndim, TYPE *A);
void init_diag_dom_near_identity_matrix(int Ndim, TYPE *A);
void init_colmaj_diag_dom_near_identity_matrix(int Ndim, TYPE *A);