root/ompi/mca/common/ompio/common_ompio_request.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
   2 /*
   3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2007 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2008-2019 University of Houston. All rights reserved.
  14  * Copyright (c) 2018      Research Organization for Information Science
  15  *                         and Technology (RIST). All rights reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #ifndef MCA_COMMON_OMPIO_REQUEST_H
  24 #define MCA_COMMON_OMPIO_REQUEST_H
  25 
  26 #include "ompi_config.h"
  27 #include "ompi/request/request.h"
  28 #include "ompi/mca/fbtl/fbtl.h"
  29 #include "common_ompio.h"
  30 
  31 BEGIN_C_DECLS
  32 
  33 extern opal_list_t mca_common_ompio_pending_requests;
  34 extern bool mca_common_ompio_progress_is_registered;
  35 
  36 /**
  37  * Type of request.
  38  */
  39 typedef enum {
  40     MCA_OMPIO_REQUEST_WRITE,
  41     MCA_OMPIO_REQUEST_READ,
  42     MCA_OMPIO_REQUEST_WRITE_ALL,
  43     MCA_OMPIO_REQUEST_READ_ALL,
  44 } mca_ompio_request_type_t;
  45 
  46 
  47 /**
  48  * Main structure for OMPIO requests
  49  */
  50 struct mca_ompio_request_t {
  51     ompi_request_t                                 req_ompi;
  52     mca_ompio_request_type_t                       req_type;
  53     void                                          *req_data;
  54     opal_list_item_t                               req_item;
  55     void                                          *req_tbuf;
  56     size_t                                         req_size;
  57     opal_convertor_t                          req_convertor;
  58     mca_fbtl_base_module_progress_fn_t      req_progress_fn;
  59     mca_fbtl_base_module_request_free_fn_t      req_free_fn;
  60 };
  61 typedef struct mca_ompio_request_t mca_ompio_request_t;
  62 OBJ_CLASS_DECLARATION(mca_ompio_request_t);
  63 
  64 #define GET_OMPIO_REQ_FROM_ITEM(ITEM) ((mca_ompio_request_t *)((char *)ITEM - offsetof(struct mca_ompio_request_t,req_item)))
  65 
  66 
  67 OMPI_DECLSPEC void mca_common_ompio_request_init ( void);
  68 OMPI_DECLSPEC void mca_common_ompio_request_fini ( void ); 
  69 OMPI_DECLSPEC void mca_common_ompio_request_alloc ( mca_ompio_request_t **req, mca_ompio_request_type_t type);
  70 OMPI_DECLSPEC int mca_common_ompio_progress ( void);
  71 OMPI_DECLSPEC void mca_common_ompio_register_progress ( void ); 
  72 
  73 END_C_DECLS
  74 
  75 #endif /* MCA_COMMON_OMPIO_REQUEST_H */

/* [<][>][^][v][top][bottom][index][help] */