-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvars.h
48 lines (40 loc) · 1.3 KB
/
vars.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
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <mpi.h>
#include <stdio.h>
#include <cmath>
#include <complex>
#include <limits>
#include <omp.h>
#include "mma.h"
#define OVERLAP //OVERLAP COMMUNICATIONS ON
#define FFACTOR 20 //FUSING FACTOR
#define WARPSIZE 32 //WARPSIZE
#define MATPREC half //MATRIX PRECISION
#define VECPREC half //VECTOR PRECISION
#define COMMPREC half //COMMUNICATION PRECISION
#define MATRIX //MATRIX STRUCTURE ON
#define MIXED //MIXED PRECISION ON
struct matrix{
unsigned short ind;
MATPREC val;
};
using namespace std;
void preproc();
void reducemap();
void communications();
void findnumpix(double,double,double*,int*);
void findpixind(double,double,double*,int*,int,int*);
void findlength(double,double,double*,double*);
void project(double*,double*,double,int);
void backproject(double*,double*,double,int);
int encode(unsigned short, unsigned short);
int xy2d (int n, int x, int y);
void d2xy(int n, int d, int *x, int *y);
void setup_gpu(double**,double**,double**,double**,double**,double**,double**);
double max_kernel(double*,int);
double dot_kernel(double*,double*,int);
void copyD2D_kernel(double*,double*,int);
void copyD2H_kernel(double*,double*,int);
void copyH2D_kernel(double*,double*,int);
void saxpy_kernel(double*,double*,double,double*,int);
void scale_kernel(double*,double,int);
void init_kernel(double*,int);