Newer
Older
#ifndef _DISPATCH_H_
#define _DISPATCH_H_
#define FUTHARK_I8 " i8"
#define FUTHARK_U8 " i8"
#define FUTHARK_I16 " i16"
#define FUTHARK_U16 " i16"
#define FUTHARK_I32 " i32"
#define FUTHARK_U32 " i32"
#define FUTHARK_I64 " i64"
#define FUTHARK_U64 " i64"
#define FUTHARK_F32 " f32"
#define FUTHARK_F64 " f64"
struct dispatch_context;
typedef struct envelope {
chunk_info_t north_west;
chunk_info_t north;
chunk_info_t north_east;
chunk_info_t east;
chunk_info_t south;
chunk_info_t south_east;
chunk_info_t west;
chunk_info_t south_west;
} envelope_t;
extern struct dispatch_context *dispatch_context_new(const int *dimensions, MPI_Datatype datatype, int n_dimensions);
extern void dispatch_context_print(struct dispatch_context *dc);
extern envelope_t get_inner_envelope(struct dispatch_context *dc, struct futhark_context *fc, int thickness);
extern envelope_t get_outer_envelope(struct dispatch_context *dc, struct futhark_context *fc, int thickness);
extern void *
futhark_outer_envelope_new(struct dispatch_context *dc, struct futhark_context *fc, envelope_t *outer_envelope,
void *f(struct futhark_context *, const void *), char *futhark_type);
extern chunk_info_t get_chunk_info(struct dispatch_context *dc);
extern void *get_data(struct dispatch_context *dc);
extern void dispatch_context_free(struct dispatch_context *dc);
extern void
set_active_domain(struct dispatch_context *dc, struct futhark_context *fc, int *dimensions, int y, int x, int z);
extern void envelope_free(envelope_t *envelope);
#endif //_DISPATCH_H_