Skip to content
Snippets Groups Projects
Commit 72890b8e authored by James Willis's avatar James Willis
Browse files

Added place holders for the vectorised versions of force and density...

Added place holders for the vectorised versions of force and density interactions for Gadget2 and Minimal SPH schemes.
parent 56e0b3ed
Branches
Tags
1 merge request!200Macro vectorisation
......@@ -103,6 +103,15 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
pj->density.rot_v[2] += facj * curlvr[2];
}
/**
* @brief Density loop (Vectorized version)
*/
__attribute__((always_inline)) INLINE static void runner_iact_vec_density(
float *R2, float *Dx, float *Hi, float *Hj, struct part **pi,
struct part **pj) {
error("A vectorised version of the Gadget2 density interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
/**
* @brief Density loop (non-symmetric version)
*/
......@@ -151,6 +160,15 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
pi->density.rot_v[2] += fac * curlvr[2];
}
/**
* @brief Density loop (non-symmetric vectorized version)
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
struct part **pi, struct part **pj) {
error("A vectorised version of the Gadget2 non-symmetric density interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
/**
* @brief Force loop
*/
......@@ -248,6 +266,15 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
pj->entropy_dt -= 0.5f * mi * visc_term * dvdr;
}
/**
* @brief Force loop (Vectorized version)
*/
__attribute__((always_inline)) INLINE static void runner_iact_vec_force(
float *R2, float *Dx, float *Hi, float *Hj, struct part **pi,
struct part **pj) {
error("A vectorised version of the Gadget2 force interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
/**
* @brief Force loop (non-symmetric version)
*/
......@@ -338,4 +365,13 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
pi->entropy_dt += 0.5f * mj * visc_term * dvdr;
}
/**
* @brief Force loop (Vectorized non-symmetric version)
*/
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
float *R2, float *Dx, float *Hi, float *Hj, struct part **pi,
struct part **pj) {
error("A vectorised version of the Gadget2 non-symmetric density interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
#endif /* SWIFT_RUNNER_IACT_LEGACY_H */
......@@ -61,6 +61,15 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
pj->density.wcount_dh -= xj * wj_dx;
}
/**
* @brief Density loop (Vectorized version)
*/
__attribute__((always_inline)) INLINE static void runner_iact_vec_density(
float *R2, float *Dx, float *Hi, float *Hj, struct part **pi,
struct part **pj) {
error("A vectorised version of the Minimal density interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
/**
* @brief Density loop (non-symmetric version)
*/
......@@ -85,6 +94,15 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
pi->density.wcount_dh -= xi * wi_dx;
}
/**
* @brief Density loop (non-symmetric vectorized version)
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
struct part **pi, struct part **pj) {
error("A vectorised version of the Minimal non-symmetric density interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
/**
* @brief Force loop
*/
......@@ -157,6 +175,15 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
pj->force.v_sig = fmaxf(pj->force.v_sig, v_sig);
}
/**
* @brief Force loop (Vectorized version)
*/
__attribute__((always_inline)) INLINE static void runner_iact_vec_force(
float *R2, float *Dx, float *Hi, float *Hj, struct part **pi,
struct part **pj) {
error("A vectorised version of the Minimal force interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
/**
* @brief Force loop (non-symmetric version)
*/
......@@ -222,4 +249,14 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
pi->force.v_sig = fmaxf(pi->force.v_sig, v_sig);
}
/**
* @brief Force loop (Vectorized non-symmetric version)
*/
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
float *R2, float *Dx, float *Hi, float *Hj, struct part **pi,
struct part **pj) {
error("A vectorised version of the Minimal non-symmetric density interaction function does not exist yet! Configure with '--disable-vec' to call the non-vectorised version.")
}
#endif /* SWIFT_RUNNER_IACT_MINIMAL_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment