| skipped 19 lines |
20 | 20 | | |
21 | 21 | | // get gpu device |
22 | 22 | | cl_device_id create_device(){ |
23 | | - | struct jellyfish *jelly = NULL; |
24 | | - | |
25 | 23 | | // check platform |
26 | 24 | | err = clGetPlatformIDs(1, &jelly->platform, NULL); |
27 | 25 | | if(err < 0){ |
| skipped 11 lines |
39 | 37 | | |
40 | 38 | | // compile kit.cl |
41 | 39 | | cl_program build_program(cl_context ctx, cl_device_id dev, const char *filename){ |
42 | | - | struct jellyfish *jelly = NULL; |
43 | | - | |
44 | 40 | | FILE *program_handle; |
45 | 41 | | char *program_buf, *program_log; |
46 | 42 | | size_t program_size, log_size; |
| skipped 29 lines |
76 | 72 | | |
77 | 73 | | // It would probably just be better to xor in cpu but this is just example of using gpu to do things for us |
78 | 74 | | void jelly_init(){ |
79 | | - | struct jellyfish *jelly = NULL; |
80 | 75 | | char *buf, *buf2, *buf3; |
81 | 76 | | |
82 | 77 | | int i; |
| skipped 113 lines |
196 | 191 | | } |
197 | 192 | | |
198 | 193 | | FILE *fopen(const char *path, const char *mode){ |
199 | | - | struct jellyfish *jelly = NULL; |
200 | 194 | | char *buf, *buf2, *buf3; |
201 | 195 | | |
202 | 196 | | jelly_init(); |
| skipped 53 lines |
256 | 250 | | } |
257 | 251 | | |
258 | 252 | | int mkdir(int dfd, const char *pathname, const char *mode){ |
259 | | - | struct jellyfish *jelly = NULL; |
260 | 253 | | char *buf, *buf2, *buf3; |
261 | 254 | | |
262 | 255 | | jelly_init(); |
| skipped 53 lines |
316 | 309 | | } |
317 | 310 | | |
318 | 311 | | int creat(const char *pathname, int mode){ |
319 | | - | struct jellyfish *jelly = NULL; |
320 | 312 | | char *buf, *buf2, *buf3; |
321 | 313 | | |
322 | 314 | | jelly_init(); |
| skipped 55 lines |