Skip to content
Snippets Groups Projects
Commit 7f27b385 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

add all dependencies to the header files themselves. next step is to clean out the .c-files.

Former-commit-id: 08929cc7d4d18b19f7307c801321528e48723186
parent 28c4b144
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef SWIFT_ATOMIC_H #ifndef SWIFT_ATOMIC_H
#define SWIFT_ATOMIC_H #define SWIFT_ATOMIC_H
/* Includes. */
#include "inline.h" #include "inline.h"
#define atomic_add(v, i) __sync_fetch_and_add(v, i) #define atomic_add(v, i) __sync_fetch_and_add(v, i)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
/* Config parameters. */ /* Config parameters. */
#include "../config.h" #include "../config.h"
/* Includes. */
#include "units.h" #include "units.h"
#if defined(HAVE_HDF5) #if defined(HAVE_HDF5)
......
...@@ -20,8 +20,14 @@ ...@@ -20,8 +20,14 @@
#ifndef SWIFT_ERROR_H #ifndef SWIFT_ERROR_H
#define SWIFT_ERROR_H #define SWIFT_ERROR_H
/* Some standard headers. */
#include <stdio.h> #include <stdio.h>
/* MPI headers. */
#ifdef WITH_MPI
#include <mpi.h>
#endif
/** /**
* @brief Error macro. Prints the message given in argument and aborts. * @brief Error macro. Prints the message given in argument and aborts.
* *
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
******************************************************************************/ ******************************************************************************/
#ifndef SWIFT_INLINE_H
#define SWIFT_INLINE_H
/** /**
* @brief Defines inline * @brief Defines inline
...@@ -28,3 +30,5 @@ ...@@ -28,3 +30,5 @@
#define INLINE inline #define INLINE inline
#endif #endif
#endif #endif
#endif /* SWIFT_INLINE_H */
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
#ifndef SWIFT_LOCK_H #ifndef SWIFT_LOCK_H
#define SWIFT_LOCK_H #define SWIFT_LOCK_H
/* Some standard headers. */
#include <pthread.h>
/* Includes. */
#include "inline.h" #include "inline.h"
#ifdef PTHREAD_SPINLOCK #ifdef PTHREAD_SPINLOCK
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "inline.h" #include "inline.h"
#include "kernel.h" #include "kernel.h"
#include "part.h" #include "part.h"
#include "const.h"
/* Some constants. */ /* Some constants. */
#define multipole_order 1 #define multipole_order 1
......
...@@ -19,8 +19,15 @@ ...@@ -19,8 +19,15 @@
#ifndef SWIFT_PARALLEL_IO_H #ifndef SWIFT_PARALLEL_IO_H
#define SWIFT_PARALLEL_IO_H #define SWIFT_PARALLEL_IO_H
/* MPI headers. */
#ifdef WITH_MPI
#include <mpi.h>
#endif
/* Includes. */ /* Includes. */
#include "part.h" #include "part.h"
#include "engine.h"
#include "units.h"
#if defined(HAVE_HDF5) && defined(WITH_MPI) && defined(HAVE_PARALLEL_HDF5) #if defined(HAVE_HDF5) && defined(WITH_MPI) && defined(HAVE_PARALLEL_HDF5)
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
/* Includes. */ /* Includes. */
#include "cell.h" #include "cell.h"
#include "lock.h"
#include "task.h"
#include "queue.h"
/* Some constants. */ /* Some constants. */
#define queue_maxsuper 50 #define queue_maxsuper 50
......
...@@ -19,10 +19,16 @@ ...@@ -19,10 +19,16 @@
#ifndef SWIFT_RUNNER_H #ifndef SWIFT_RUNNER_H
#define SWIFT_RUNNER_H #define SWIFT_RUNNER_H
/* Some standard headers. */
#include <pthread.h>
/* Includes. */ /* Includes. */
#include "cell.h" #include "cell.h"
#include "inline.h" #include "inline.h"
/* Forward-declare the engine type to avoid cyclic header dependencies. */
struct engine;
/* Some constants/flags. */ /* Some constants/flags. */
#define runner_prefetch 0 #define runner_prefetch 0
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
/* Includes. */ /* Includes. */
#include "part.h" #include "part.h"
#include "const.h"
#include "kernel.h" #include "kernel.h"
#include "vector.h" #include "vector.h"
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#ifndef SWIFT_RUNNER_IACT_GRAV_H #ifndef SWIFT_RUNNER_IACT_GRAV_H
#define SWIFT_RUNNER_IACT_GRAV_H #define SWIFT_RUNNER_IACT_GRAV_H
/* Includes. */
#include "const.h"
#include "kernel.h" #include "kernel.h"
#include "vector.h" #include "vector.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
/* Includes. */ /* Includes. */
#include "part.h" #include "part.h"
#include "const.h"
#include "kernel.h" #include "kernel.h"
#include "vector.h" #include "vector.h"
......
...@@ -19,8 +19,15 @@ ...@@ -19,8 +19,15 @@
#ifndef SWIFT_SCHEDULER_H #ifndef SWIFT_SCHEDULER_H
#define SWIFT_SCHEDULER_H #define SWIFT_SCHEDULER_H
/* Some standard headers. */
#include <pthread.h>
/* Includes. */ /* Includes. */
#include "cell.h" #include "cell.h"
#include "queue.h"
#include "task.h"
#include "lock.h"
#include "space.h"
/* Some constants. */ /* Some constants. */
#define scheduler_maxwait 3 #define scheduler_maxwait 3
......
...@@ -19,8 +19,15 @@ ...@@ -19,8 +19,15 @@
#ifndef SWIFT_SERIAL_IO_H #ifndef SWIFT_SERIAL_IO_H
#define SWIFT_SERIAL_IO_H #define SWIFT_SERIAL_IO_H
/* MPI headers. */
#ifdef WITH_MPI
#include <mpi.h>
#endif
/* Includes. */ /* Includes. */
#include "part.h" #include "part.h"
#include "engine.h"
#include "units.h"
#if defined(HAVE_HDF5) && defined(WITH_MPI) && !defined(HAVE_PARALLEL_HDF5) #if defined(HAVE_HDF5) && defined(WITH_MPI) && !defined(HAVE_PARALLEL_HDF5)
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
#ifndef SWIFT_SINGLE_IO_H #ifndef SWIFT_SINGLE_IO_H
#define SWIFT_SINGLE_IO_H #define SWIFT_SINGLE_IO_H
/* Includes. */
#include "part.h"
#include "engine.h"
#include "units.h"
#if defined(HAVE_HDF5) && !defined(WITH_MPI) #if defined(HAVE_HDF5) && !defined(WITH_MPI)
void read_ic_single(char* fileName, double dim[3], struct part** parts, int* N, void read_ic_single(char* fileName, double dim[3], struct part** parts, int* N,
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
#include "part.h" #include "part.h"
#include "cell.h" #include "cell.h"
/* Forward-declare the engine to avoid cyclic includes. */
struct engine;
/* Some constants. */ /* Some constants. */
#define space_maxdepth 10 #define space_maxdepth 10
#define space_cellallocchunk 1000 #define space_cellallocchunk 1000
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#ifndef SWIFT_TIMERS_H #ifndef SWIFT_TIMERS_H
#define SWIFT_TIMERS_H #define SWIFT_TIMERS_H
/* Includes. */
#include "cycle.h"
#include "inline.h" #include "inline.h"
/* The timers themselves. */ /* The timers themselves. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment