Commit a8d7b01e authored by James Willis's avatar James Willis
Browse files

Remove vector casts for c++ compilation.

parent 6f1cd9a7
......@@ -275,11 +275,15 @@ __attribute__((always_inline)) INLINE static vector pow_dimension_vec(
#if defined(HYDRO_DIMENSION_3D)
return (vector)(vec_mul(vec_mul(x.v, x.v), x.v));
vector x3;
x3.v = vec_mul(vec_mul(x.v, x.v), x.v);
return x3;
#elif defined(HYDRO_DIMENSION_2D)
return (vector)(vec_mul(x.v, x.v));
vector x2;
x2.v = vec_mul(x.v, x.v);
return x2;
#elif defined(HYDRO_DIMENSION_1D)
......@@ -304,16 +308,22 @@ __attribute__((always_inline)) INLINE static vector pow_dimension_plus_one_vec(
#if defined(HYDRO_DIMENSION_3D)
const vector x2 = (vector)(vec_mul(x.v, x.v));
return (vector)(vec_mul(x2.v, x2.v));
vector x2, x4;
x2.v = vec_mul(x.v, x.v);
x4.v = vec_mul(x2.v, x2.v);
return x4;
#elif defined(HYDRO_DIMENSION_2D)
return (vector)(vec_mul(x.v, vec_mul(x.v, x.v)));
vector x3;
x3.v = vec_mul(vec_mul(x.v, x.v), x.v);
return x3;
#elif defined(HYDRO_DIMENSION_1D)
return (vector)(vec_mul(x.v, x.v));
vector x2;
x2.v = vec_mul(x.v, x.v);
return x2;
#else
......
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