--- enzo-enzo-dev-2984068d220f/src/enzo/FindSuperSourceByPosition.C.orig 2016-03-08 18:30:43.000000000 +0100 +++ enzo-enzo-dev-2984068d220f/src/enzo/FindSuperSourceByPosition.C 2016-12-15 23:45:26.669128191 +0100 @@ -1,7 +1,9 @@ #include <stdlib.h> #include <stdio.h> #include <math.h> +#ifndef NOSSE #include <xmmintrin.h> +#endif #include "ErrorExceptions.h" #include "macros_and_parameters.h" #include "typedefs.h" @@ -151,7 +153,7 @@ /* SSE intrinsic approximate inverse sqrt. IEEE precision isn't required to choose the correct leafs. */ - +#ifndef NOSSE inline void vrsqrt(Eflt32* __x, Eflt32* __outrsqrt) { __m128 x = _mm_set_ss(*__x); @@ -160,6 +162,8 @@ // _m128* precip = (__m128 *)__outrsqrt; // *precip = _mm_mul_ss(_mm_set_ss(0.5f), _mm_add_ss(recip, _mm_rcp_ss(_mm_mul_ss(x, recip)))); } +#endif + float CalculateLWFromTree(const FLOAT pos[], const float angle, @@ -183,10 +187,13 @@ radius2 += dx*dx; } +#ifndef NOSSE temp = (Eflt32)radius2; temp = max(min_radius, temp); vrsqrt(&temp, &radius_inv); - //radius_inv = 1.0 / sqrtf((float)radius2); +#else + radius_inv = 1.0 / sqrtf((float)radius2); +#endif tan_angle = Leaf->ClusteringRadius * radius_inv; // int pid = (Leaf->ParentSource == NULL) ? -1 : Leaf->ParentSource->LeafID;