Skip to content
Snippets Groups Projects
Select Git revision
  • f54757091979f37c0c8b8d33d8c7e7feea3bb182
  • master default protected
  • report
  • dev
4 results

dispatch.h

Blame
  • dispatch.h 1.47 KiB
    #ifndef _DISPATCH_H_
    #define _DISPATCH_H_
    
    #include "futhark.h"
    #include "chunk_info.h"
    
    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 *, uint8_t *, ...),
                                           void *futhark_envelope[]);
    
    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 futhark_outer_envelope_free(struct dispatch_context *dc, struct futhark_context *fc,
                                            int f(struct futhark_context *, void *), void *foe[]);
    
    extern void envelope_free(envelope_t *envelope);
    
    #endif //_DISPATCH_H_