Fix nblib pairlist update function
[alexxy/gromacs.git] / api / nblib / gmxbackenddata.h
index 6794bb47debd747241e8fc99336e816c9e238330..d9528f4e35da177c79a73f2ec9d9158b00e92153 100644 (file)
@@ -77,7 +77,8 @@ public:
     GmxBackendData(const NBKernelOptions& options,
                    int                    numEnergyGroups,
                    gmx::ArrayRef<int>     exclusionRanges,
-                   gmx::ArrayRef<int>     exclusionElements)
+                   gmx::ArrayRef<int>     exclusionElements) :
+        numThreads_(options.numOpenMPThreads)
     {
         // Set hardware params from the execution context
         setGmxNonBondedNThreads(options.numOpenMPThreads);
@@ -120,6 +121,9 @@ public:
     //! Non-bonded flop counter; currently only needed as an argument for dispatchNonbondedKernel
     t_nrnb nrnb_;
 
+    //! Number of OpenMP threads to use
+    int numThreads_;
+
     //! Keep track of whether updatePairlist has been called at least once
     bool updatePairlistCalled{ false };
 };