Commit a239328b by James Willis

### Use intrinsics for vector operations as arithmetic overloading is not...

`Use intrinsics for vector operations as arithmetic overloading is not supported by the Intel compiler yet.`
parent 82194d03
 ... ... @@ -275,11 +275,11 @@ __attribute__((always_inline)) INLINE static vector pow_dimension_vec( #if defined(HYDRO_DIMENSION_3D) return (vector)(x.v * x.v * x.v); return (vector)(vec_mul(vec_mul(x.v, x.v), x.v)); #elif defined(HYDRO_DIMENSION_2D) return (vector)(x.v * x.v); return (vector)(vec_mul(x.v, x.v)); #elif defined(HYDRO_DIMENSION_1D) ... ... @@ -304,16 +304,16 @@ __attribute__((always_inline)) INLINE static vector pow_dimension_plus_one_vec( #if defined(HYDRO_DIMENSION_3D) const vector x2 = (vector)(x.v * x.v); return (vector)(x2.v * x2.v); const vector x2 = (vector)(vec_mul(x.v, x.v)); return (vector)(vec_mul(x2.v, x2.v)); #elif defined(HYDRO_DIMENSION_2D) return (vector)(x.v * x.v * x.v); return (vector)(vec_mul(x.v, vec_mul(x.v, x.v))); #elif defined(HYDRO_DIMENSION_1D) return (vector)(x.v * x.v); return (vector)(vec_mul(x.v, x.v)); #else ... ...
 ... ... @@ -68,7 +68,7 @@ int main() { vx.f[j] = (i + j) * 2.25f / numPoints; } vx_h.v = vx.v / vec_set1(h); vx_h.v = vec_mul(vx.v, vec_set1(1.f/h)); kernel_deval_1_vec(&vx_h, &W_vec, &dW_vec); ... ... @@ -106,8 +106,8 @@ int main() { vx_2.f[j] = (i + j) * 2.25f / numPoints; } vx_h.v = vx.v / vec_set1(h); vx_h_2.v = vx_2.v / vec_set1(h); vx_h.v = vec_mul(vx.v, vec_set1(1.f/h)); vx_h_2.v = vec_mul(vx_2.v, vec_set1(1.f/h)); kernel_deval_2_vec(&vx_h, &W_vec, &dW_vec, &vx_h_2, &W_vec_2, &dW_vec_2); ... ...
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