2 #ifndef __KERNELS_MATHS__
3 #define __KERNELS_MATHS__
5 __device__ void calcul_indices_prec_suiv(int nb_nodes, int nx, int& nprec, int& nsuiv);
7 __device__ double codage_niveau_gris_hyp_gaussienne_gpu(uint32 stat_sum_1, uint64 stat_sum_x,
8 uint64 stat_sum_x2, uint32 n_dim,
9 uint64 SUM_X, uint64 SUM_X2);
11 __device__ double codage_gl_hyp_gaussienne(uint64 stat_sum_1, uint64 stat_sum_x, uint64 stat_sum_x2,
12 uint64 n_dim, uint64 SUM_X, uint64 SUM_X2);
14 __device__ inline unsigned int nextPow2_gpu( unsigned int x );
16 __device__ inline int sign_diff_strict(int val1, int val2);
19 __device__ inline int sign_diff_ou_egal_zero(int val1, int val2);
22 __device__ inline int sinus_triangle(int Ai, int Aj, int Bi, int Bj, int Ci, int Cj);
24 __device__ inline int test_croisement_large(uint32 Ai, uint32 Aj, uint32 Bi, uint32 Bj,
25 uint32 Ui, uint32 Uj, uint32 Vi, uint32 Vj);
28 __device__ inline int test_croisement_strict(uint32 Ai, uint32 Aj, uint32 Bi, uint32 Bj,
29 uint32 Ui, uint32 Uj, uint32 Vi, uint32 Vj );
32 __global__ void kernel_test_croisement_move_seg_strict(struct snake_node_gpu *d_snake, uint32 nx, uint32 Nxi, uint32 Nxj, int Nb_nodes, bool * croist);
35 __device__ bool test_croisement(struct snake_node_gpu *d_snake, uint32 nx, uint32 Nxi, uint32 Nxj, int Nb_nodes);