1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 #ifndef MCA_RCACHE_GPUSM_H
  28 #define MCA_RCACHE_GPUSM_H
  29 
  30 #include "opal_config.h"
  31 #include "opal/class/opal_list.h"
  32 #include "opal/mca/rcache/rcache.h"
  33 
  34 BEGIN_C_DECLS
  35 
  36 #define MEMHANDLE_SIZE 8
  37 #define EVTHANDLE_SIZE 8
  38 struct mca_rcache_gpusm_registration_t {
  39     mca_rcache_base_registration_t base;
  40     uint64_t memHandle[MEMHANDLE_SIZE]; 
  41     uint64_t evtHandle[EVTHANDLE_SIZE]; 
  42     uintptr_t event;                    
  43 };
  44 typedef struct mca_rcache_gpusm_registration_t mca_rcache_gpusm_registration_t;
  45 OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_rcache_gpusm_registration_t);
  46 
  47 struct mca_rcache_gpusm_component_t {
  48     mca_rcache_base_component_t super;
  49 };
  50 typedef struct mca_rcache_gpusm_component_t mca_rcache_gpusm_component_t;
  51 
  52 OPAL_DECLSPEC extern mca_rcache_gpusm_component_t mca_rcache_gpusm_component;
  53 
  54 struct mca_rcache_gpusm_module_t {
  55     mca_rcache_base_module_t super;
  56     opal_free_list_t reg_list;
  57 }; typedef struct mca_rcache_gpusm_module_t mca_rcache_gpusm_module_t;
  58 
  59 
  60 
  61 
  62 void mca_rcache_gpusm_module_init(mca_rcache_gpusm_module_t *rcache);
  63 
  64 
  65 
  66 
  67 int mca_rcache_gpusm_register(mca_rcache_base_module_t* rcache, void *addr,
  68         size_t size, uint32_t flags, int32_t access_flags, mca_rcache_base_registration_t **reg);
  69 
  70 
  71 
  72 
  73 int mca_rcache_gpusm_deregister(mca_rcache_base_module_t *rcache,
  74         mca_rcache_base_registration_t *reg);
  75 
  76 
  77 
  78 
  79 int mca_rcache_gpusm_find(struct mca_rcache_base_module_t* rcache, void* addr,
  80         size_t size, mca_rcache_base_registration_t **reg);
  81 
  82 
  83 
  84 
  85 void mca_rcache_gpusm_finalize(struct mca_rcache_base_module_t *rcache);
  86 
  87 END_C_DECLS
  88 #endif