/*
* 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.
/* GPU emulation detection is done later, but we need here as well
* -- uncool, but there's no elegant workaround */
- bEmulateGPU = (getenv("GMX_EMULATE_GPU") != NULL);
+ bEmulateGPU = (getenv("GMX_EMULATE_GPU") != nullptr);
if (hwinfo->gpu_info.n_dev_compatible > 0)
{
/* detect GPUs */
hwinfo_g->gpu_info.n_dev = 0;
hwinfo_g->gpu_info.n_dev_compatible = 0;
- hwinfo_g->gpu_info.gpu_dev = NULL;
+ hwinfo_g->gpu_info.gpu_dev = nullptr;
/* Run the detection if the binary was compiled with GPU support
* and we requested detection.
*/
hwinfo_g->gpu_info.bDetectGPUs =
(bGPUBinary && bDetectGPUs &&
- getenv("GMX_DISABLE_GPU_DETECTION") == NULL);
+ getenv("GMX_DISABLE_GPU_DETECTION") == nullptr);
if (hwinfo_g->gpu_info.bDetectGPUs)
{
gmx_detect_gpus(mdlog, cr);
{
const gmx::CpuInfo &cpuInfo = *hwinfo_g->cpuInfo;
- if (fplog != NULL)
+ if (fplog != nullptr)
{
std::string detected;
{
char *env;
- if (gpu_opt->gpu_id != NULL && !bGPUBinary)
+ if (gpu_opt->gpu_id != nullptr && !bGPUBinary)
{
gmx_fatal(FARGS, "GPU ID string set, but %s was compiled without GPU support!",
gmx::getProgramContext().displayName());
}
env = getenv("GMX_GPU_ID");
- if (env != NULL && gpu_opt->gpu_id != NULL)
+ if (env != nullptr && gpu_opt->gpu_id != nullptr)
{
gmx_fatal(FARGS, "GMX_GPU_ID and -gpu_id can not be used at the same time");
}
- if (env == NULL)
+ if (env == nullptr)
{
env = gpu_opt->gpu_id;
}
/* parse GPU IDs if the user passed any */
- if (env != NULL)
+ if (env != nullptr)
{
/* Parse a "plain" or comma-separated GPU ID string which contains a
* sequence of digits corresponding to GPU IDs; the order will