Add logic to only select intel/omp trim

This commit is contained in:
Stan Gerald Moore
2022-07-12 13:37:19 -06:00
parent d63e450998
commit 5986c607d0
3 changed files with 9 additions and 5 deletions

View File

@ -56,7 +56,7 @@ void NPairHalffullNewtonTrimIntel::build_t(NeighList *list,
const int * _noalias const numneigh_full = list->listfull->numneigh;
const int ** _noalias const firstneigh_full = (const int ** const)list->listfull->firstneigh; // NOLINT
const double cutsq_custom = cutoff_custom * cutoff_custom;
const flt_t cutsq_custom = cutoff_custom * cutoff_custom;
#if defined(_OPENMP)
#pragma omp parallel
@ -156,7 +156,7 @@ void NPairHalffullNewtonTrimIntel::build_t3(NeighList *list, int *numhalf,
const int * _noalias const numneigh_full = numhalf;
const int ** _noalias const firstneigh_full = (const int ** const)list->listfull->firstneigh; // NOLINT
const double cutsq_custom = cutoff_custom * cutoff_custom;
const flt_t cutsq_custom = cutoff_custom * cutoff_custom;
int packthreads = 1;
if (comm->nthreads > INTEL_HTHREADS) packthreads = comm->nthreads;

View File

@ -53,7 +53,7 @@ void NPairTrimIntel::build_t(NeighList *list,
const int * _noalias const numneigh_copy = list->listcopy->numneigh;
const int ** _noalias const firstneigh_copy = (const int ** const)list->listcopy->firstneigh; // NOLINT
const double cutsq_custom = cutoff_custom * cutoff_custom;
const flt_t cutsq_custom = cutoff_custom * cutoff_custom;
#if defined(_OPENMP)
#pragma omp parallel

View File

@ -2063,12 +2063,16 @@ int Neighbor::choose_pair(NeighRequest *rq)
// pairnames[i],pairmasks[i]);
// if copy request, no further checks needed, just return or continue
// Trim and Kokkos device/host flags must also match in order to copy
// trim and Kokkos device/host flags must also match in order to copy
// intel and omp flags must match to trim
if (rq->copy) {
if (!(mask & NP_COPY)) continue;
if (rq->trim)
if (rq->trim) {
if (!rq->trim != !(mask & NP_TRIM)) continue;
if (!rq->omp != !(mask & NP_OMP)) continue;
if (!rq->intel != !(mask & NP_INTEL)) continue;
}
if (rq->kokkos_device || rq->kokkos_host) {
if (!rq->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue;
if (!rq->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue;