|
| 1 | +/* |
| 2 | + * $COPYRIGHT$ |
| 3 | + * |
| 4 | + * Additional copyrights may follow |
| 5 | + * |
| 6 | + * $HEADER$ |
| 7 | + */ |
| 8 | + |
| 9 | +#ifndef MCA_COLL_SPACC_EXPORT_H |
| 10 | +#define MCA_COLL_SPACC_EXPORT_H |
| 11 | + |
| 12 | +#include "ompi_config.h" |
| 13 | + |
| 14 | +#include "mpi.h" |
| 15 | +#include "ompi/mca/coll/coll.h" |
| 16 | + |
| 17 | +BEGIN_C_DECLS |
| 18 | + |
| 19 | +/* Globally exported variables */ |
| 20 | +extern int ompi_coll_spacc_stream; |
| 21 | +extern int ompi_coll_spacc_priority; |
| 22 | + |
| 23 | +/* API functions */ |
| 24 | + |
| 25 | +int mca_coll_spacc_init_query(bool enable_progress_threads, |
| 26 | + bool enable_mpi_threads); |
| 27 | +mca_coll_base_module_t |
| 28 | +*mca_coll_spacc_comm_query(struct ompi_communicator_t *comm, int *priority); |
| 29 | + |
| 30 | +int mca_coll_spacc_module_enable(mca_coll_base_module_t *module, |
| 31 | + struct ompi_communicator_t *comm); |
| 32 | + |
| 33 | +int mca_coll_spacc_allreduce_intra_redscat_allgather( |
| 34 | + const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, |
| 35 | + struct ompi_op_t *op, struct ompi_communicator_t *comm, |
| 36 | + mca_coll_base_module_t *module); |
| 37 | + |
| 38 | +int mca_coll_spacc_reduce_intra_redscat_gather( |
| 39 | + const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, |
| 40 | + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, |
| 41 | + mca_coll_base_module_t *module); |
| 42 | + |
| 43 | +/* |
| 44 | + * coll API functions |
| 45 | + */ |
| 46 | + |
| 47 | +/* API functions */ |
| 48 | + |
| 49 | +int ompi_coll_spacc_init_query(bool enable_progress_threads, |
| 50 | + bool enable_mpi_threads); |
| 51 | + |
| 52 | +mca_coll_base_module_t * |
| 53 | +ompi_coll_spacc_comm_query(struct ompi_communicator_t *comm, int *priority); |
| 54 | + |
| 55 | +struct mca_coll_spacc_component_t { |
| 56 | + /* Base coll component */ |
| 57 | + mca_coll_base_component_2_0_0_t super; |
| 58 | + |
| 59 | + /* MCA parameter: priority of this component */ |
| 60 | + int spacc_priority; |
| 61 | + |
| 62 | + /* global stuff that I need the component to store */ |
| 63 | + |
| 64 | + /* MCA parameters first */ |
| 65 | +}; |
| 66 | + |
| 67 | +/* |
| 68 | + * Convenience typedef |
| 69 | + */ |
| 70 | +typedef struct mca_coll_spacc_component_t mca_coll_spacc_component_t; |
| 71 | + |
| 72 | +/* |
| 73 | + * Global component instance |
| 74 | + */ |
| 75 | +OMPI_MODULE_DECLSPEC extern mca_coll_spacc_component_t mca_coll_spacc_component; |
| 76 | + |
| 77 | +struct mca_coll_spacc_module_t { |
| 78 | + mca_coll_base_module_t super; |
| 79 | +}; |
| 80 | +typedef struct mca_coll_spacc_module_t mca_coll_spacc_module_t; |
| 81 | +OBJ_CLASS_DECLARATION(mca_coll_spacc_module_t); |
| 82 | + |
| 83 | +#endif /* MCA_COLL_SPACC_EXPORT_H */ |
0 commit comments