/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
ma(&ptr_new, nbytes_new);
- if (nbytes_new > 0 && ptr_new == NULL)
+ if (nbytes_new > 0 && ptr_new == nullptr)
{
gmx_fatal(FARGS, "Allocation of %d bytes failed", nbytes_new);
}
}
memcpy(ptr_new, *ptr, nbytes_copy);
}
- if (*ptr != NULL)
+ if (*ptr != nullptr)
{
mf(*ptr);
}
int nenergrp, int stride,
nbnxn_alloc_t *ma)
{
- out->f = NULL;
+ out->f = nullptr;
ma((void **)&out->fshift, SHIFTS*DIM*sizeof(*out->fshift));
out->nV = nenergrp*nenergrp;
ma((void **)&out->Vvdw, out->nV*sizeof(*out->Vvdw));
char *ptr;
gmx_bool simple, bCombGeom, bCombLB, bSIMD;
- if (alloc == NULL)
+ if (alloc == nullptr)
{
nbat->alloc = nbnxn_alloc_aligned;
}
{
nbat->alloc = alloc;
}
- if (free == NULL)
+ if (free == nullptr)
{
nbat->free = nbnxn_free_aligned;
}
*/
tol = 1e-5;
ptr = getenv("GMX_LJCOMB_TOL");
- if (ptr != NULL)
+ if (ptr != nullptr)
{
double dbl;
set_lj_parameter_data(nbat, bSIMD);
nbat->natoms = 0;
- nbat->type = NULL;
- nbat->lj_comb = NULL;
+ nbat->type = nullptr;
+ nbat->lj_comb = nullptr;
if (simple)
{
int pack_x;
nbat->XFormat = nbatXYZQ;
nbat->FFormat = nbatXYZ;
}
- nbat->q = NULL;
+ nbat->q = nullptr;
nbat->nenergrp = n_energygroups;
if (!simple)
{
/* Energy groups not supported yet for super-sub lists */
- if (n_energygroups > 1 && fp != NULL)
+ if (n_energygroups > 1 && fp != nullptr)
{
fprintf(fp, "\nNOTE: With GPUs, reporting energy group contributions is not supported\n\n");
}
{
nbat->neg_2log++;
}
- nbat->energrp = NULL;
+ nbat->energrp = nullptr;
nbat->alloc((void **)&nbat->shift_vec, SHIFTS*sizeof(*nbat->shift_vec));
nbat->xstride = (nbat->XFormat == nbatXYZQ ? STRIDE_XYZQ : DIM);
nbat->fstride = (nbat->FFormat == nbatXYZQ ? STRIDE_XYZQ : DIM);
- nbat->x = NULL;
+ nbat->x = nullptr;
#if GMX_SIMD
if (simple)
nbat->nenergrp, 1<<nbat->neg_2log,
nbat->alloc);
}
- nbat->buffer_flags.flag = NULL;
+ nbat->buffer_flags.flag = nullptr;
nbat->buffer_flags.flag_nalloc = 0;
nth = gmx_omp_nthreads_get(emntNonbonded);
ptr = getenv("GMX_USE_TREEREDUCE");
- if (ptr != NULL)
+ if (ptr != nullptr)
{
- nbat->bUseTreeReduce = strtol(ptr, 0, 10);
+ nbat->bUseTreeReduce = strtol(ptr, nullptr, 10);
}
#if defined __MIC__
else if (nth > 8) /*on the CPU we currently don't benefit even at 32*/