#ifndef MAINFUNC
#define MAINFUNC


/*
 * Class:     electrosphere_FluidSim
 * Method:    addSourceToVectors
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void addSourceToVectors
  (int, int, float **, float **, float **, float **, float **, float **, float, float, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    solveVectorDiffuse
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void solveVectorDiffuse
  (int, int, float **, float **, float **, float **, float **, float **, float, float, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    setupProjection
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void setupProjection
  (
  int N,
  int chunk_mask,
  float ** ur,
  float ** vr,
  float ** wr,
  float ** pr,
  float ** divr,
  float DIFFUSION_CONST,
  float VISCOSITY_CONST,
  float dt);

/*
 * Class:     electrosphere_FluidSim
 * Method:    solveProjection
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void solveProjection
  (int, int, float **, float **, float **, float **, float **, float **, float, float, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    finalizeProjection
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void finalizeProjection
  (int, int,  float **, float **, float **, float **, float **, float **, float, float, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    advectVectors
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void advectVectors
  (int, int, float **, float **, float **, float **, float **, float **, float, float, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    addDensity
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;F)V
 */
static inline void addDensity
  (int, int, float **, float **, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    solveDiffuseDensity
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void solveDiffuseDensity
  (int, int, float **, float **, float **, float **, float **, float, float, float);

/*
 * Class:     electrosphere_FluidSim
 * Method:    advectDensity
 * Signature: (II[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;FFF)V
 */
static inline void advectDensity(uint32_t chunk_mask, int N, float ** d, float ** d0, float ** ur, float ** vr, float ** wr, float dt);

static inline void setBoundsToNeighborsRaw
  (
  int N,
  int chunk_mask,
  int vector_dir,
  float ** neighborArray);

static inline void copyNeighborsRaw
  (
  int N,
  int chunk_mask,
  int cx,
  int vector_dir,
  float ** neighborArray);

#endif