Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / legacyheaders / gmx_thread_affinity.h
index 2ee5cfd4e328b03611cfcfa95339586b03d145b0..d2a2ce2b55de4989ed065cc1fa02c15f788975e8 100644 (file)
  */
 #ifndef GMX_THREAD_AFFINITY_H_
 #define GMX_THREAD_AFFINITY_H_
-#include "typedefs.h"
+
+#include <stdio.h>
+
+#include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -43,14 +47,16 @@ extern "C" {
 } /* fixes auto-indentation problems */
 #endif
 
+struct t_commrec;
+
 /* Sets the thread affinity using the requested setting stored in hw_opt.
  * The hardware topologu is requested from hwinfo, when present.
  */
 void
-gmx_set_thread_affinity(FILE                *fplog,
-                        const t_commrec     *cr,
-                        gmx_hw_opt_t        *hw_opt,
-                        const gmx_hw_info_t *hwinfo);
+gmx_set_thread_affinity(FILE                       *fplog,
+                        const struct t_commrec     *cr,
+                        gmx_hw_opt_t               *hw_opt,
+                        const gmx_hw_info_t        *hwinfo);
 
 /* Check the process affinity mask and if it is found to be non-zero,
  * will honor it and disable mdrun internal affinity setting.
@@ -61,9 +67,11 @@ gmx_set_thread_affinity(FILE                *fplog,
  * made by the OpenMP library.
  *
  * Note that this will only work on Linux as we use a GNU feature.
+ * With bAfterOpenmpInit false, it will also detect whether OpenMP environment
+ * variables for setting the affinity are set.
  */
 void
-gmx_check_thread_affinity_set(FILE *fplog, const t_commrec *cr,
+gmx_check_thread_affinity_set(FILE *fplog, const struct t_commrec *cr,
                               gmx_hw_opt_t *hw_opt, int ncpus,
                               gmx_bool bAfterOpenmpInit);