Commit 0f532a4e authored by James Willis's avatar James Willis
Browse files

Removed commented out code.

parent 7a521fa2
......@@ -807,208 +807,6 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec(
#endif /* WITH_VECTORIZATION */
}
//void runner_doself_subset_density_vec_1(struct runner *r, struct cell *restrict ci,
// struct part *restrict parts, int *restrict ind, int count) {
//
//#ifdef SWIFT_DEBUG_CHECKS
// const struct engine *e = r->e;
//#endif
//
// TIMER_TIC;
//
// const int count_i = ci->count;
// struct part *restrict parts_j = ci->parts;
//
// /* Get the particle cache from the runner and re-allocate
// * the cache if it is not big enough for the cell. */
// struct cache *restrict cell_cache = &r->ci_cache;
//
// if (cell_cache->count < count_i) {
// cache_init(cell_cache, count_i);
// }
//
// /* Read the particles from the cell and store them locally in the cache. */
// cache_read_particles(ci, cell_cache);
//
// /* Loop over the parts in ci. */
// for (int pid = 0; pid < count; pid++) {
//
// /* Get a hold of the ith part in ci. */
// struct part *pi = &parts[ind[pid]];
// //const float pix[3] = {pi->x[0] - ci->loc[0], pi->x[1] - ci->loc[1],
// // pi->x[2] - ci->loc[2]};
// //const float hi = pi->h;
//
// const float pix = cell_cache->x[ind[pid]];
// const float piy = cell_cache->y[ind[pid]];
// const float piz = cell_cache->z[ind[pid]];
//
// const float hi = cell_cache->h[ind[pid]];
//
// //const float hi_inv = 1.0f / hi;
// const float hig2 = hi * hi * kernel_gamma2;
//
//#ifdef SWIFT_DEBUG_CHECKS
// if (!part_is_active(pi, e)) error("Inactive particle in subset function!");
//#endif
//
// //float rhoSum = 0, rho_dhSum = 0, wcountSum = 0, wcount_dhSum = 0,div_vSum = 0, curlvxSum = 0, curlvySum = 0, curlvzSum = 0;
//
// //swift_align_information(cell_cache->x, SWIFT_CACHE_ALIGNMENT);
// //swift_align_information(cell_cache->y, SWIFT_CACHE_ALIGNMENT);
// //swift_align_information(cell_cache->z, SWIFT_CACHE_ALIGNMENT);
//
// /* Loop over the parts in cj. */
////#pragma simd
// for (int pjd = 0; pjd < count_i; pjd++) {
//
// /* Get a pointer to the jth particle. */
// struct part *restrict pj = &parts_j[pjd];
//
// const float pjx = cell_cache->x[pjd];
// const float pjy = cell_cache->y[pjd];
// const float pjz = cell_cache->z[pjd];
//
// /* Compute the pairwise distance. */
// //float dx[3] = {pix[0] - pjx, pix[1] - pjy, pix[2] - pjz};
// float dx[3] = {pix - pjx, piy - pjy, piz - pjz};
// const float r2 = dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2];
//
// //const float pjx[3] = {pj->x[0] - ci->loc[0], pj->x[1] - ci->loc[1],
// // pj->x[2] - ci->loc[2]};
// //float dx[3] = {pix[0] - pjx[0], pix[1] - pjx[1], pix[2] - pjx[2]};
// //const float r2 = dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2];
//
//#ifdef SWIFT_DEBUG_CHECKS
// /* Check that particles have been drifted to the current time */
// if (pi->ti_drift != e->ti_current)
// error("Particle pi not drifted to current time");
// if (pj->ti_drift != e->ti_current)
// error("Particle pj not drifted to current time");
//#endif
//
// //runner_iact_nonsym_density_self_cond(r2, hig2, dx, hi_inv, pj->h, pi, pj, &rhoSum, &rho_dhSum, &wcountSum, &wcount_dhSum, &div_vSum, &curlvxSum, &curlvySum, &curlvzSum);//, cell_cache, pjd);
// if (r2 > 0.f && r2 < hig2) {
// runner_iact_nonsym_density(r2, dx, hi, pj->h, pi, pj);
// }
//
// } /* loop over the parts in cj. */
//
// //message("No. of interactions: %d.", intCount);
// //pi->rho += rhoSum;
// //pi->density.rho_dh += rho_dhSum;
// //pi->density.wcount += wcountSum;
// //pi->density.wcount_dh += wcount_dhSum;
// //pi->density.div_v += div_vSum;
// //pi->density.rot_v[0] += curlvxSum;
// //pi->density.rot_v[1] += curlvySum;
// //pi->density.rot_v[2] += curlvzSum;
// } /* loop over the parts in ci. */
//
// TIMER_TOC(timer_doself_subset);
//}
//
//void runner_doself_subset_density_vec(struct runner *r, struct cell *restrict ci,
// struct part *restrict parts, int *restrict ind, int count) {
//
//#ifdef SWIFT_DEBUG_CHECKS
// const struct engine *e = r->e;
//#endif
//
// TIMER_TIC;
//
// const int count_i = ci->count;
// struct part *restrict parts_j = ci->parts;
//
// /* Get the particle cache from the runner and re-allocate
// * the cache if it is not big enough for the cell. */
// struct cache *restrict cell_cache = &r->ci_cache;
//
// if (cell_cache->count < count_i) {
// cache_init(cell_cache, count_i);
// }
//
// /* Read the particles from the cell and store them locally in the cache. */
// cache_read_particles(ci, cell_cache);
//
// /* Loop over the parts in ci. */
// for (int pid = 0; pid < count; pid++) {
//
// /* Get a hold of the ith part in ci. */
// struct part *pi = &parts[ind[pid]];
// //const float pix[3] = {pi->x[0] - ci->loc[0], pi->x[1] - ci->loc[1],
// // pi->x[2] - ci->loc[2]};
// //const float hi = pi->h;
//
// const float pix = cell_cache->x[ind[pid]];
// const float piy = cell_cache->y[ind[pid]];
// const float piz = cell_cache->z[ind[pid]];
//
// const float hi = cell_cache->h[ind[pid]];
//
// //const float hi_inv = 1.0f / hi;
// const float hig2 = hi * hi * kernel_gamma2;
//
//#ifdef SWIFT_DEBUG_CHECKS
// if (!part_is_active(pi, e)) error("Inactive particle in subset function!");
//#endif
//
// //float rhoSum = 0, rho_dhSum = 0, wcountSum = 0, wcount_dhSum = 0,div_vSum = 0, curlvxSum = 0, curlvySum = 0, curlvzSum = 0;
//
// //swift_align_information(cell_cache->x, SWIFT_CACHE_ALIGNMENT);
// //swift_align_information(cell_cache->y, SWIFT_CACHE_ALIGNMENT);
// //swift_align_information(cell_cache->z, SWIFT_CACHE_ALIGNMENT);
//
// /* Loop over the parts in cj. */
////#pragma simd
// for (int pjd = 0; pjd < count_i; pjd++) {
//
// /* Get a pointer to the jth particle. */
// struct part *restrict pj = &parts_j[pjd];
//
// const float pjx = cell_cache->x[pjd];
// const float pjy = cell_cache->y[pjd];
// const float pjz = cell_cache->z[pjd];
//
// /* Compute the pairwise distance. */
// //float dx[3] = {pix[0] - pjx, pix[1] - pjy, pix[2] - pjz};
// float dx[3] = {pix - pjx, piy - pjy, piz - pjz};
// const float r2 = dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2];
//
// //const float pjx[3] = {pj->x[0] - ci->loc[0], pj->x[1] - ci->loc[1],
// // pj->x[2] - ci->loc[2]};
// //float dx[3] = {pix[0] - pjx[0], pix[1] - pjx[1], pix[2] - pjx[2]};
// //const float r2 = dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2];
//
//#ifdef SWIFT_DEBUG_CHECKS
// /* Check that particles have been drifted to the current time */
// if (pi->ti_drift != e->ti_current)
// error("Particle pi not drifted to current time");
// if (pj->ti_drift != e->ti_current)
// error("Particle pj not drifted to current time");
//#endif
//
// //runner_iact_nonsym_density_self_cond(r2, hig2, dx, hi_inv, pj->h, pi, pj, &rhoSum, &rho_dhSum, &wcountSum, &wcount_dhSum, &div_vSum, &curlvxSum, &curlvySum, &curlvzSum);//, cell_cache, pjd);
// if (r2 > 0.f && r2 < hig2) {
// runner_iact_nonsym_density(r2, dx, hi, pj->h, pi, pj);
// }
//
// } /* loop over the parts in cj. */
//
// //message("No. of interactions: %d.", intCount);
// //pi->rho += rhoSum;
// //pi->density.rho_dh += rho_dhSum;
// //pi->density.wcount += wcountSum;
// //pi->density.wcount_dh += wcount_dhSum;
// //pi->density.div_v += div_vSum;
// //pi->density.rot_v[0] += curlvxSum;
// //pi->density.rot_v[1] += curlvySum;
// //pi->density.rot_v[2] += curlvzSum;
// } /* loop over the parts in ci. */
//
// TIMER_TOC(timer_doself_subset);
//}
/**
* @brief Compute the force cell self-interaction (non-symmetric) using vector
* intrinsics with one particle pi at a time.
......
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