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

Private GIT Repository
initialisation du snake par rectangle 'le plus probable'
[snake_gpu.git] / src / lib_kernels_maths.h
1
2 #ifndef __KERNELS_MATHS__
3 #define __KERNELS_MATHS__
4
5 __device__ void calcul_indices_prec_suiv(int nb_nodes, int nx, int& nprec, int& nsuiv);
6
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);
10
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);
13
14 __device__ inline unsigned int nextPow2_gpu( unsigned int x ); 
15
16 __device__ inline int sign_diff_strict(int val1, int val2);
17
18
19 __device__ inline int sign_diff_ou_egal_zero(int val1, int val2);
20
21
22 __device__ inline int sinus_triangle(int Ai, int Aj, int Bi, int Bj, int Ci, int Cj);
23
24 __device__ inline int test_croisement_large(uint32 Ai, uint32 Aj, uint32 Bi, uint32 Bj,
25                                                                                         uint32 Ui, uint32 Uj, uint32 Vi, uint32 Vj);
26
27
28 __device__ inline int test_croisement_strict(uint32 Ai, uint32 Aj, uint32 Bi, uint32 Bj,
29                                                                                          uint32 Ui, uint32 Uj, uint32 Vi, uint32 Vj );
30
31
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);
33
34
35 __device__ bool test_croisement(struct snake_node_gpu *d_snake, uint32 nx, uint32 Nxi, uint32 Nxj, int Nb_nodes);
36
37 #endif