Commit 8cbae064 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix bug in balsara, found by matthieu.


Former-commit-id: cee33042fcd80bedd4d1d7e7df9cd9c482fa392f
parent a01841d4
......@@ -431,7 +431,7 @@ void runner_doghost ( struct runner *r , struct cell *c ) {
p->force.POrho2 = u * ( const_gamma - 1.0f ) / ( rho + hg * rho_dh / 3.0f );
/* Balsara switch */
p->force.balsara = normCurl_v / ( normDiv_v + normCurl_v + 0.0001f * fc * ihg );
p->force.balsara = normDiv_v / ( normDiv_v + normCurl_v + 0.0001f * fc * ihg );
/* Reset the acceleration. */
for ( k = 0 ; k < 3 ; k++ )
......
......@@ -27,7 +27,7 @@
#define VEC_MACRO(elcount, type) __attribute__((vector_size((elcount)*sizeof(type)))) type
/* So what will the vector size be? */
#ifdef __AVX__
#ifdef NO__AVX__
#define VECTORIZE
#define VEC_SIZE 8
#define VEC_FLOAT __m256
......@@ -54,7 +54,7 @@
#define vec_dbl_ftoi(a) _mm256_cvttpd_epi32(a)
#define vec_dbl_fmin(a,b) _mm256_min_pd(a,b)
#define vec_dbl_fmax(a,b) _mm256_max_pd(a,b)
#elif defined( __SSE2__ )
#elif defined( NO__SSE2__ )
#define VECTORIZE
#define VEC_SIZE 4
#define VEC_FLOAT __m128
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment