diff options
author | Leo Chan <leochanj@live.unc.edu> | 2020-10-22 01:53:21 -0400 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-22 01:56:35 -0400 |
commit | d17b33131c14864bd1eae275f49a3f148e21cf29 (patch) | |
tree | 0d8f77922e8d193cb0f6edab83018f057aad64a0 /SD-VBS/benchmarks/texture_synthesis/src/c/texture.h | |
parent | 601ed25a4c5b66cb75315832c15613a727db2c26 (diff) |
Squashed commit of the sb-vbs branch.
Includes the SD-VBS benchmarks modified to:
- Use libextra to loop as realtime jobs
- Preallocate memory before starting their main computation
- Accept input via stdin instead of via argc
Does not include the SD-VBS matlab code.
Fixes libextra execution in LITMUS^RT.
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/c/texture.h')
-rw-r--r-- | SD-VBS/benchmarks/texture_synthesis/src/c/texture.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/c/texture.h b/SD-VBS/benchmarks/texture_synthesis/src/c/texture.h new file mode 100644 index 0000000..9819c03 --- /dev/null +++ b/SD-VBS/benchmarks/texture_synthesis/src/c/texture.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /******************************** | ||
2 | Author: Sravanthi Kota Venkata | ||
3 | ********************************/ | ||
4 | |||
5 | #ifndef _TEXTURE_ | ||
6 | #define _TEXTURE_ | ||
7 | |||
8 | #include "sdvbs_common.h" | ||
9 | |||
10 | #define R 0 | ||
11 | #define G 1 | ||
12 | #define B 2 | ||
13 | #define a(x,y,W) (1*((y)*(W)+(x))) | ||
14 | #define aa(x,y) (2*((y)*data->widthout+(x))) | ||
15 | |||
16 | typedef float pixelvalue; | ||
17 | |||
18 | typedef struct | ||
19 | { | ||
20 | double sign, diff; | ||
21 | int x,y; | ||
22 | int secondx, secondy; | ||
23 | }signature; | ||
24 | |||
25 | typedef struct{ | ||
26 | int localx, localy, localz; | ||
27 | int widthin, widthout; | ||
28 | int heightin, heightout; | ||
29 | int nfin, nfout; | ||
30 | }params; | ||
31 | |||
32 | void *SIGNATURES; | ||
33 | |||
34 | //void create_texture(F2D *image, F2D *result, params *data); | ||
35 | void create_texture(F2D *image, params *data); | ||
36 | I2D* parse_flags(int argc, char ** argv); | ||
37 | void init_params(params *data); | ||
38 | //void init(F2D *result, F2D *image, params* data); | ||
39 | void init(F2D *image, params* data); | ||
40 | double compare_full_neighb(F2D *image,int x, int y, F2D *image1,int x1, int y1, params* data); | ||
41 | double compare_neighb(F2D *image,int x, int y, F2D *image1,int x1, int y1, params* data); | ||
42 | int create_candidates(int x,int y, params* data); | ||
43 | int create_all_candidates(int x,int y, params* data); | ||
44 | |||
45 | #endif | ||
46 | |||
47 | |||
48 | |||