Separate management of GPU contexts from modules
[alexxy/gromacs.git] / src / gromacs / taskassignment / taskassignment.h
index 294230543ebb3ff69430fd71983ba6cfb5139ecc..62123e082405d0935ecf228398de2552584a02c2 100644 (file)
@@ -118,6 +118,13 @@ runTaskAssignment(const std::vector<int>     &gpuIdsToUse,
                   const t_commrec            *cr,
                   const std::vector<GpuTask> &gpuTasksOnThisRank);
 
+//! Function for whether the task of \c mapping has value \c TaskType.
+template<GpuTask TaskType>
+bool hasTaskType(const GpuTaskMapping &mapping)
+{
+    return mapping.task_ == TaskType;
+}
+
 } // namespace
 
 #endif