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