]> AND Private Git Repository - snake_gpu.git/blob - src/lib_gpu.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
test tex
[snake_gpu.git] / src / lib_gpu.h
1 #ifndef _LIB_GPU_H_
2 #define _LIB_GPU_H_
3
4 inline unsigned int nextPow2( unsigned int x ) {
5   --x;
6   x |= x >> 1;
7   x |= x >> 2;
8   x |= x >> 4;
9   x |= x >> 8;
10   x |= x >> 16;
11   return ++x;
12 }
13
14
15 void cuda_init_img_cumul(unsigned short ** img_in, int H, int L, int nb_nodes,
16                                                  unsigned short ** d_img, t_cumul_x ** d_img_x, t_cumul_x2 ** d_img_x2,
17                                                  int ** d_freemanDiDj, int ** d_codeNoeud,
18                                                  snake_node_gpu ** d_snake, uint32 ** d_nb_pix_max,
19                                                  uint4 ** d_positions, uint64 ** d_contribs_segments, uint4 ** d_freemans_centres,
20                                                  int ** d_codes_segments, int64 ** d_stats_snake,
21                                                  int64 ** d_stats, int64 ** d_stats_ref, double ** d_vrais, double ** d_vrais_snake,
22                                                  uint2 ** d_liste_pixels, uint64 ** d_contribs_segments_blocs,
23                                                  bool ** d_move
24                                                  );
25
26 void affiche_snake_gpu(int **image, snake_node_gpu *snake, int nnodes_, int valseg, int valnoeud,
27                                            uint32 *liste_pixel_segment);
28
29 #endif //_LIB_GPU_H_