Commit 20cc7089 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent 0442c30d
......@@ -117,9 +117,9 @@ __attribute__((always_inline)) INLINE static float pow_gamma(float x) {
const float icbrt = icbrtf(x); /* x^(-1/3) */
return icbrt * x * x; /* x^(5/3) */
#else
const float cbrt = cbrtf(x); /* x^(1/3) */
return cbrt * cbrt * x; /* x^(5/3) */
#endif // WITH_ICBRTF
const float cbrt = cbrtf(x); /* x^(1/3) */
return cbrt * cbrt * x; /* x^(5/3) */
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_7_5)
......@@ -128,11 +128,11 @@ __attribute__((always_inline)) INLINE static float pow_gamma(float x) {
#elif defined(HYDRO_GAMMA_4_3)
#ifdef WITH_ICBRTF
const float icbrt = icbrtf(x); /* x^(-1/3) */
return icbrt * icbrt * x * x; /* x^(4/3) */
const float icbrt = icbrtf(x); /* x^(-1/3) */
return icbrt * icbrt * x * x; /* x^(4/3) */
#else
return cbrtf(x) * x; /* x^(4/3) */
#endif // WITH_ICBRTF
return cbrtf(x) * x; /* x^(4/3) */
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_2_1)
......@@ -161,9 +161,9 @@ __attribute__((always_inline)) INLINE static float pow_gamma_minus_one(
const float icbrt = icbrtf(x); /* x^(-1/3) */
return x * icbrt; /* x^(2/3) */
#else
const float cbrt = cbrtf(x); /* x^(1/3) */
return cbrt * cbrt; /* x^(2/3) */
#endif // WITH_ICBRTF
const float cbrt = cbrtf(x); /* x^(1/3) */
return cbrt * cbrt; /* x^(2/3) */
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_7_5)
......@@ -172,11 +172,11 @@ __attribute__((always_inline)) INLINE static float pow_gamma_minus_one(
#elif defined(HYDRO_GAMMA_4_3)
#ifdef WITH_ICBRTF
const float icbrt = icbrtf(x); /* x^(-1/3) */
return x * icbrt * icbrt; /* x^(1/3) */
const float icbrt = icbrtf(x); /* x^(-1/3) */
return x * icbrt * icbrt; /* x^(1/3) */
#else
return cbrtf(x); /* x^(1/3) */
#endif // WITH_ICBRTF
return cbrtf(x); /* x^(1/3) */
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_2_1)
......@@ -205,9 +205,9 @@ __attribute__((always_inline)) INLINE static float pow_minus_gamma_minus_one(
const float icbrt = icbrtf(x); /* x^(-1/3) */
return icbrt * icbrt; /* x^(-2/3) */
#else
const float cbrt_inv = 1.f / cbrtf(x); /* x^(-1/3) */
return cbrt_inv * cbrt_inv; /* x^(-2/3) */
#endif // WITH_ICBRTF
const float cbrt_inv = 1.f / cbrtf(x); /* x^(-1/3) */
return cbrt_inv * cbrt_inv; /* x^(-2/3) */
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_7_5)
......@@ -216,10 +216,10 @@ __attribute__((always_inline)) INLINE static float pow_minus_gamma_minus_one(
#elif defined(HYDRO_GAMMA_4_3)
#ifdef WITH_ICBRTF
return icbrtf(x); /* x^(-1/3) */
return icbrtf(x); /* x^(-1/3) */
#else
return 1.f / cbrtf(x); /* x^(-1/3) */
#endif // WITH_ICBRTF
return 1.f / cbrtf(x); /* x^(-1/3) */
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_2_1)
......@@ -254,7 +254,7 @@ __attribute__((always_inline)) INLINE static float pow_minus_gamma(float x) {
const float cbrt_inv = 1.f / cbrtf(x); /* x^(-1/3) */
const float cbrt_inv2 = cbrt_inv * cbrt_inv; /* x^(-2/3) */
return cbrt_inv * cbrt_inv2 * cbrt_inv2; /* x^(-5/3) */
#endif // WITH_ICBRTF
#endif // WITH_ICBRTF
#elif defined(HYDRO_GAMMA_7_5)
......@@ -265,8 +265,8 @@ __attribute__((always_inline)) INLINE static float pow_minus_gamma(float x) {
#ifdef WITH_ICBRTF
const float cbrt_inv = icbrtf(x); /* x^(-1/3) */
#else
const float cbrt_inv = 1.f / cbrtf(x); /* x^(-1/3) */
#endif // WITH_ICBRTF
const float cbrt_inv = 1.f / cbrtf(x); /* x^(-1/3) */
#endif // WITH_ICBRTF
const float cbrt_inv2 = cbrt_inv * cbrt_inv; /* x^(-2/3) */
return cbrt_inv2 * cbrt_inv2; /* x^(-4/3) */
......
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