Reduce transitive dependencies on other GROMACS headers.
* Replace `GMX_ASSERT` with `assert`
* Replace `index` with `difference_type`
Refs #3674
#include "gromacs/ewald/pme_force_sender_gpu.h"
#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/gmxassert.h"
#if !GMX_GPU_CUDA
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/defaultinitializationallocator.h"
+#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/gmxmpi.h"
#include "spline_vectors.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2018,2019,2020, 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.
#include "gromacs/math/units.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
+#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/pleasecite.h"
#include "gromacs/utility/smalloc.h"
#include <algorithm>
#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/gmxassert.h"
namespace gmx
{
#include "config.h"
#include "gromacs/mdlib/update_constrain_gpu.h"
+#include "gromacs/utility/gmxassert.h"
#if !GMX_GPU_CUDA
#include <vector>
#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/gmxmpi.h"
namespace gmx
#ifndef GMX_UTILITY_ARRAYREF_H
#define GMX_UTILITY_ARRAYREF_H
+#include <cassert>
#include <cstddef>
#include <array>
# include <gromacs/external/boost/stl_interfaces/iterator_interface.hpp>
#endif
-#include "gromacs/utility/gmxassert.h"
-
namespace gmx
{
*/
ArrayRef(pointer begin, pointer end) : begin_(begin), end_(end)
{
- GMX_ASSERT(end >= begin, "Invalid range");
+ assert((end >= begin && "Invalid range"));
}
/*! \brief
* Constructs a reference to a particular range.
*/
ArrayRef(iterator begin, iterator end) : begin_(begin), end_(end)
{
- GMX_ASSERT(end >= begin, "Invalid range");
+ assert((end >= begin && "Invalid range"));
}
//! \cond
// Doxygen 1.8.5 doesn't parse the declaration correctly...
*/
size_type size() const { return end_ - begin_; }
//! Returns the signed size of the reference.
- index ssize() const { return size(); }
+ difference_type ssize() const { return size(); }
//! Identical to size().
size_type capacity() const { return end_ - begin_; }
//! Whether the reference refers to no memory.