Skip to content
Snippets Groups Projects
Commit a386b4b6 authored by James Willis's avatar James Willis
Browse files

Use FLT_MIN as padded value for the smoothing length to prevent fake particles...

Use FLT_MIN as padded value for the smoothing length to prevent fake particles being in range when vec_fmax(hig2,hjg2) is used to set the smoothing length.
parent ad351260
No related branches found
No related tags found
1 merge request!440Dopair2 vectorisation
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "sort_part.h" #include "sort_part.h"
#include "vector.h" #include "vector.h"
#include <float.h>
#define NUM_VEC_PROC 2 #define NUM_VEC_PROC 2
#define C2_CACHE_SIZE (NUM_VEC_PROC * VEC_SIZE * 6) + (NUM_VEC_PROC * VEC_SIZE) #define C2_CACHE_SIZE (NUM_VEC_PROC * VEC_SIZE * 6) + (NUM_VEC_PROC * VEC_SIZE)
...@@ -517,7 +519,7 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted_f ...@@ -517,7 +519,7 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted_f
x[i] = fake_pix; x[i] = fake_pix;
y[i] = 1.f; y[i] = 1.f;
z[i] = 1.f; z[i] = 1.f;
h[i] = 1.f; h[i] = FLT_MIN;
m[i] = 1.f; m[i] = 1.f;
vx[i] = 1.f; vx[i] = 1.f;
...@@ -573,7 +575,7 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted_f ...@@ -573,7 +575,7 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted_f
xj[i] = fake_pjx; xj[i] = fake_pjx;
yj[i] = 1.f; yj[i] = 1.f;
zj[i] = 1.f; zj[i] = 1.f;
hj[i] = 1.f; hj[i] = FLT_MIN;
mj[i] = 1.f; mj[i] = 1.f;
vxj[i] = 1.f; vxj[i] = 1.f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment