/*
* 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.
if (depth >= 0)
{
- hwloc_obj_t cache = hwloc_get_next_obj_by_depth(topo, depth, NULL);
- if (cache != NULL)
+ hwloc_obj_t cache = hwloc_get_next_obj_by_depth(topo, depth, nullptr);
+ if (cache != nullptr)
{
std::vector<hwloc_obj_t> hwThreads = getHwLocDescendantsByType(cache, HWLOC_OBJ_PU);
int depth = hwloc_get_type_depth(topo, HWLOC_OBJ_NUMANODE);
const struct hwloc_distances_s * dist = hwloc_get_whole_distance_matrix_by_depth(topo, depth);
- if (dist != NULL && dist->nbobjs == hwlocNumaNodes.size())
+ if (dist != nullptr && dist->nbobjs == hwlocNumaNodes.size())
{
machine->numa.baseLatency = dist->latency_base;
machine->numa.maxRelativeLatency = dist->latency_max;
else
{
// No numa nodes found. Use the entire machine as a numa node.
- const hwloc_obj_t hwlocMachine = hwloc_get_next_obj_by_type(topo, HWLOC_OBJ_MACHINE, NULL);
+ const hwloc_obj_t hwlocMachine = hwloc_get_next_obj_by_type(topo, HWLOC_OBJ_MACHINE, nullptr);
- if (hwlocMachine != NULL)
+ if (hwlocMachine != nullptr)
{
machine->numa.nodes.resize(1);
machine->numa.nodes[0].id = 0;
{
const hwloc_obj_t ancestor = hwloc_get_ancestor_obj_by_type(topo, HWLOC_OBJ_NUMANODE, p);
int numaId;
- if (ancestor != NULL)
+ if (ancestor != nullptr)
{
numaId = ancestor->logical_index;
}
hwloc_topology_set_flags(topo, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
- if (hwloc_topology_load(topo) != 0 || hwloc_get_root_obj(topo) == NULL)
+ if (hwloc_topology_load(topo) != 0 || hwloc_get_root_obj(topo) == nullptr)
{
hwloc_topology_destroy(topo);
return; // SupportLevel::None.