/*! Initializes simulation constant data. */
FUNC_QUALIFIER
-void nbnxn_cuda_init_const(nbnxn_cuda_ptr_t p_cu_nb,
- const interaction_const_t *ic,
- const nonbonded_verlet_t *nbv) FUNC_TERM
+void nbnxn_cuda_init_const(nbnxn_cuda_ptr_t cu_nb,
+ const interaction_const_t *ic,
+ const nonbonded_verlet_group_t *nbv_group) FUNC_TERM
/*! Initializes pair-list data for GPU, called at every pair search step. */
FUNC_QUALIFIER
static void prepare_verlet_scheme(FILE *fplog,
gmx_hw_info_t *hwinfo,
t_commrec *cr,
- gmx_hw_opt_t *hw_opt,
const char *nbpu_opt,
t_inputrec *ir,
const gmx_mtop_t *mtop,
if (inputrec->cutoff_scheme == ecutsVERLET)
{
- prepare_verlet_scheme(fplog, hwinfo, cr, hw_opt, nbpu_opt,
+ prepare_verlet_scheme(fplog, hwinfo, cr, nbpu_opt,
inputrec, mtop, state->box,
&minf.bUseGPU);
}
if (fr->nbv != NULL && fr->nbv->bUseGPU)
{
- nbnxn_cuda_init_const(fr->nbv->cu_nbv, ic, fr->nbv);
+ nbnxn_cuda_init_const(fr->nbv->cu_nbv, ic, fr->nbv->grp);
}
bUsesSimpleTables = uses_simple_tables(fr->cutoff_scheme, fr->nbv, -1);
/*! Initializes the nonbonded parameter data structure. */
static void init_nbparam(cu_nbparam_t *nbp,
const interaction_const_t *ic,
- const nonbonded_verlet_t *nbv,
+ const nbnxn_atomdata_t *nbat,
const cuda_dev_info_t *dev_info)
{
cudaError_t stat;
int ntypes, nnbfp;
- ntypes = nbv->grp[0].nbat->ntype;
+ ntypes = nbat->ntype;
nbp->ewald_beta = ic->ewaldcoeff;
nbp->sh_ewald = ic->sh_ewald;
nnbfp = 2*ntypes*ntypes;
stat = cudaMalloc((void **)&nbp->nbfp, nnbfp*sizeof(*nbp->nbfp));
CU_RET_ERR(stat, "cudaMalloc failed on nbp->nbfp");
- cu_copy_H2D(nbp->nbfp, nbv->grp[0].nbat->nbfp, nnbfp*sizeof(*nbp->nbfp));
+ cu_copy_H2D(nbp->nbfp, nbat->nbfp, nnbfp*sizeof(*nbp->nbfp));
cudaChannelFormatDesc cd = cudaCreateChannelDesc<float>();
stat = cudaBindTexture(NULL, &nbnxn_cuda_get_nbfp_texref(),
}
}
-void nbnxn_cuda_init_const(nbnxn_cuda_ptr_t cu_nb,
- const interaction_const_t *ic,
- const nonbonded_verlet_t *nbv)
+void nbnxn_cuda_init_const(nbnxn_cuda_ptr_t cu_nb,
+ const interaction_const_t *ic,
+ const nonbonded_verlet_group_t *nbv_group)
{
- init_atomdata_first(cu_nb->atdat, nbv->grp[0].nbat->ntype);
- init_nbparam(cu_nb->nbparam, ic, nbv, cu_nb->dev_info);
+ init_atomdata_first(cu_nb->atdat, nbv_group[0].nbat->ntype);
+ init_nbparam(cu_nb->nbparam, ic, nbv_group[0].nbat, cu_nb->dev_info);
/* clear energy and shift force outputs */
nbnxn_cuda_clear_e_fshift(cu_nb);