Fix clang-tidy-11 errors in NBNXM module, part 1
[alexxy/gromacs.git] / src / gromacs / nbnxm / nbnxm.h
index 9a212ce929dab162502e20ca77b3cf931a4693be..b7c3101799d1e555ef80900b0d50131e2c1f157e 100644 (file)
@@ -291,7 +291,7 @@ public:
     gmx::ArrayRef<const int> getLocalAtomOrder() const;
 
     //! Sets the order of the local atoms to the order grid atom ordering
-    void setLocalAtomOrder();
+    void setLocalAtomOrder() const;
 
     //! Returns the index position of the atoms on the search grid
     gmx::ArrayRef<const int> getGridIndices() const;
@@ -311,12 +311,12 @@ public:
     void constructPairlist(gmx::InteractionLocality     iLocality,
                            const gmx::ListOfLists<int>& exclusions,
                            int64_t                      step,
-                           t_nrnb*                      nrnb);
+                           t_nrnb*                      nrnb) const;
 
     //! Updates all the atom properties in Nbnxm
     void setAtomProperties(gmx::ArrayRef<const int>  atomTypes,
                            gmx::ArrayRef<const real> atomCharges,
-                           gmx::ArrayRef<const int>  atomInfo);
+                           gmx::ArrayRef<const int>  atomInfo) const;
 
     /*!\brief Convert the coordinates to NBNXM format for the given locality.
      *
@@ -343,10 +343,10 @@ public:
                                GpuEventSynchronizer*   xReadyOnDevice);
 
     //! Init for GPU version of setup coordinates in Nbnxm
-    void atomdata_init_copy_x_to_nbat_x_gpu();
+    void atomdata_init_copy_x_to_nbat_x_gpu() const;
 
     //! Sync the nonlocal GPU stream with dependent tasks in the local queue.
-    void insertNonlocalGpuDependency(gmx::InteractionLocality interactionLocality);
+    void insertNonlocalGpuDependency(gmx::InteractionLocality interactionLocality) const;
 
     //! Returns a reference to the pairlist sets
     const PairlistSets& pairlistSets() const { return *pairlistSets_; }
@@ -358,7 +358,7 @@ public:
     bool isDynamicPruningStepGpu(int64_t step) const;
 
     //! Dispatches the dynamic pruning kernel for the given locality, for CPU lists
-    void dispatchPruneKernelCpu(gmx::InteractionLocality iLocality, const rvec* shift_vec);
+    void dispatchPruneKernelCpu(gmx::InteractionLocality iLocality, const rvec* shift_vec) const;
 
     //! Dispatches the dynamic pruning kernel for GPU lists
     void dispatchPruneKernelGpu(int64_t step);
@@ -395,13 +395,13 @@ public:
      * \param [in] locality   Local or non-local
      * \returns               The number of atoms for given locality
      */
-    int getNumAtoms(gmx::AtomLocality locality);
+    int getNumAtoms(gmx::AtomLocality locality) const;
 
     /*! \brief Get the pointer to the GPU nonbonded force buffer
      *
      * \returns A pointer to the force buffer in GPU memory
      */
-    void* getGpuForces();
+    void* getGpuForces() const;
 
     //! Return the kernel setup
     const Nbnxm::KernelSetup& kernelSetup() const { return kernelSetup_; }
@@ -413,13 +413,12 @@ public:
     real pairlistOuterRadius() const;
 
     //! Changes the pair-list outer and inner radius
-    void changePairlistRadii(real rlistOuter, real rlistInner);
+    void changePairlistRadii(real rlistOuter, real rlistInner) const;
 
     //! Set up internal flags that indicate what type of short-range work there is.
-    void setupGpuShortRangeWork(const gmx::GpuBonded* gpuBonded, gmx::InteractionLocality iLocality);
+    void setupGpuShortRangeWork(const gmx::GpuBonded* gpuBonded, gmx::InteractionLocality iLocality) const;
 
     // TODO: Make all data members private
-public:
     //! All data related to the pair lists
     std::unique_ptr<PairlistSets> pairlistSets_;
     //! Working data for constructing the pairlists