Skip to content
Snippets Groups Projects
Commit dbe0f66d authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Revert "Remove vector casts for c++ compilation."

This reverts commit a8d7b01e.
parent 4dd8cea4
Branches
Tags
1 merge request!505Cpp
......@@ -275,15 +275,11 @@ __attribute__((always_inline)) INLINE static vector pow_dimension_vec(
#if defined(HYDRO_DIMENSION_3D)
vector x3;
x3.v = vec_mul(vec_mul(x.v, x.v), x.v);
return x3;
return (vector)(vec_mul(vec_mul(x.v, x.v), x.v));
#elif defined(HYDRO_DIMENSION_2D)
vector x2;
x2.v = vec_mul(x.v, x.v);
return x2;
return (vector)(vec_mul(x.v, x.v));
#elif defined(HYDRO_DIMENSION_1D)
......@@ -308,22 +304,16 @@ __attribute__((always_inline)) INLINE static vector pow_dimension_plus_one_vec(
#if defined(HYDRO_DIMENSION_3D)
vector x2, x4;
x2.v = vec_mul(x.v, x.v);
x4.v = vec_mul(x2.v, x2.v);
return x4;
const vector x2 = (vector)(vec_mul(x.v, x.v));
return (vector)(vec_mul(x2.v, x2.v));
#elif defined(HYDRO_DIMENSION_2D)
vector x3;
x3.v = vec_mul(vec_mul(x.v, x.v), x.v);
return x3;
return (vector)(vec_mul(x.v, vec_mul(x.v, x.v)));
#elif defined(HYDRO_DIMENSION_1D)
vector x2;
x2.v = vec_mul(x.v, x.v);
return x2;
return (vector)(vec_mul(x.v, x.v));
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment