-
Notifications
You must be signed in to change notification settings - Fork 0
/
optical_clipping_common.h
77 lines (59 loc) · 1.74 KB
/
optical_clipping_common.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef OPTICAL_CLIPPING_COMMON_H
#define OPTICAL_CLIPPING_COMMON_H
#include <cuda_runtime.h>
typedef struct {
float x[8];
float y[8];
} clippedGeom;
typedef struct {
int numPoints;
float x[8], y[8];
} FootPrint;
typedef struct {
float hclip[4];
float magdx;
float magdy;
float selfitsnx[4];
float selfitsny[4];
float sortedselfitsnx[4];
float sortedselfitsny[4];
float lineEdge[8][2];
FootPrint newPoly;
FootPrint newTex;
int inpolyTest[4];
float perpLines[4][4];
float newpln_1[4];
float newpln_2[4];
float newpln_3[4];
float newpln_4[4];
float xv[4];
float yv[4];
int uniqueSelfItsn;
} experimentData;
////////////////////////////////////////////////////////////////////////////////
// Reference CPU clipping
////////////////////////////////////////////////////////////////////////////////
extern "C" void computeTriClipCPU(
float *h_Dst,
float *h_Src,
float *h_Kernel,
int imageW,
int imageH,
int kernelR
);
extern "C" void initCuda(cudaArray *boxfilter_Src, cudaChannelFormatDesc channelDesc);
////////////////////////////////////////////////////////////////////////////////
// GPU clipping
////////////////////////////////////////////////////////////////////////////////
/*
extern "C"
void computeTriClipGPU(
int filterFrame, int numExposures,int spatialImgWidth, int spatialImgHeight,
int *d_sensorX, int *d_sensorY, int *d_plane,
clippedGeom *d_resultsGeom, clippedGeom *d_resultsTex, int *d_resultsGeomLen,
int numSensors);
*/
extern "C"
void callKernel(int filterFrames, int numExposures, int spatialWidth, int spatialHeight, int *d_sensorX, int *d_sensorY, int* d_plane,
clippedGeom *d_resultsGeom,clippedGeom *d_resultsGeom, int *d_resultsGeomLen, int maxSensors, experimentData *debug);
#endif