1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 #ifndef MCA_SSHMEM_UCX_EXPORT_H
  12 #define MCA_SSHMEM_UCX_EXPORT_H
  13 
  14 #include "oshmem_config.h"
  15 
  16 #include "oshmem/mca/sshmem/sshmem.h"
  17 
  18 #include <ucp/api/ucp.h>
  19 
  20 BEGIN_C_DECLS
  21 
  22 typedef struct sshmem_ucx_shadow_allocator sshmem_ucx_shadow_allocator_t;
  23 
  24 
  25 
  26 
  27 typedef struct mca_sshmem_ucx_component_t {
  28     
  29     mca_sshmem_base_component_t super;
  30     
  31     int priority;
  32 } mca_sshmem_ucx_component_t;
  33 
  34 OSHMEM_MODULE_DECLSPEC extern mca_sshmem_ucx_component_t
  35 mca_sshmem_ucx_component;
  36 
  37 typedef struct mca_sshmem_ucx_segment_context {
  38     void                           *dev_mem;
  39     sshmem_ucx_shadow_allocator_t  *shadow_allocator;
  40     ucp_mem_h                       ucp_memh;
  41 } mca_sshmem_ucx_segment_context_t;
  42 
  43 typedef struct mca_sshmem_ucx_module_t {
  44     mca_sshmem_base_module_t super;
  45 } mca_sshmem_ucx_module_t;
  46 extern mca_sshmem_ucx_module_t mca_sshmem_ucx_module;
  47 
  48 sshmem_ucx_shadow_allocator_t *sshmem_ucx_shadow_create(unsigned count);
  49 void sshmem_ucx_shadow_destroy(sshmem_ucx_shadow_allocator_t *allocator);
  50 int sshmem_ucx_shadow_alloc(sshmem_ucx_shadow_allocator_t *allocator,
  51                             unsigned count, unsigned *index);
  52 
  53 
  54 
  55 
  56 
  57 
  58 int sshmem_ucx_shadow_realloc(sshmem_ucx_shadow_allocator_t *allocator,
  59                               unsigned count, unsigned old_index, unsigned *index,
  60                               int *inplace);
  61 int sshmem_ucx_shadow_free(sshmem_ucx_shadow_allocator_t *allocator,
  62                            unsigned index);
  63 unsigned sshmem_ucx_shadow_size(sshmem_ucx_shadow_allocator_t *allocator,
  64                                 unsigned index);
  65 
  66 END_C_DECLS
  67 
  68 #endif