Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / legacyheaders / gmx_thread_affinity.h
index 955bb20ba57967d7881dda7c43c447d67188e366..d2a2ce2b55de4989ed065cc1fa02c15f788975e8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, 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.
  */
 #ifndef GMX_THREAD_AFFINITY_H_
 #define GMX_THREAD_AFFINITY_H_
-#include "types/commrec.h"
-#include "typedefs.h"
+
+#include <stdio.h>
+
+#include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -44,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.
@@ -62,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);