|
| 1 | +/* |
| 2 | + * Copyright (c) 2014-2020 The University of Tennessee and The University |
| 3 | + * of Tennessee Research Foundation. All rights |
| 4 | + * reserved. |
| 5 | + * $COPYRIGHT$ |
| 6 | + * |
| 7 | + * Additional copyrights may follow |
| 8 | + * |
| 9 | + * $HEADER$ |
| 10 | + */ |
| 11 | + |
| 12 | +#include "ompi/mca/coll/coll.h" |
| 13 | +#include "ompi/mca/coll/base/coll_base_topo.h" |
| 14 | +#include "ompi/mca/coll/base/coll_base_functions.h" |
| 15 | +#include <math.h> |
| 16 | + |
| 17 | +typedef struct mca_coll_adapt_algorithm_index_s { |
| 18 | + int algorithm_index; |
| 19 | + uintptr_t algorithm_fn_ptr; |
| 20 | +} mca_coll_adapt_algorithm_index_t; |
| 21 | + |
| 22 | +/* Bcast */ |
| 23 | +int mca_coll_adapt_ibcast_init(void); |
| 24 | +int mca_coll_adapt_ibcast_fini(void); |
| 25 | +int mca_coll_adapt_bcast(void *buff, int count, struct ompi_datatype_t *datatype, int root, |
| 26 | + struct ompi_communicator_t *comm, mca_coll_base_module_t * module); |
| 27 | +int mca_coll_adapt_ibcast(void *buff, int count, struct ompi_datatype_t *datatype, int root, |
| 28 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 29 | + mca_coll_base_module_t * module); |
| 30 | +int mca_coll_adapt_ibcast_generic(void *buff, int count, struct ompi_datatype_t *datatype, int root, |
| 31 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 32 | + mca_coll_base_module_t * module, ompi_coll_tree_t * tree, |
| 33 | + size_t seg_size, int ibcast_tag); |
| 34 | +int mca_coll_adapt_ibcast_binomial(void *buff, int count, struct ompi_datatype_t *datatype, |
| 35 | + int root, struct ompi_communicator_t *comm, |
| 36 | + ompi_request_t ** request, mca_coll_base_module_t * module, |
| 37 | + int ibcast_tag); |
| 38 | +int mca_coll_adapt_ibcast_in_order_binomial(void *buff, int count, struct ompi_datatype_t *datatype, |
| 39 | + int root, struct ompi_communicator_t *comm, |
| 40 | + ompi_request_t ** request, |
| 41 | + mca_coll_base_module_t * module, int ibcast_tag); |
| 42 | +int mca_coll_adapt_ibcast_binary(void *buff, int count, struct ompi_datatype_t *datatype, int root, |
| 43 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 44 | + mca_coll_base_module_t * module, int ibcast_tag); |
| 45 | +int mca_coll_adapt_ibcast_pipeline(void *buff, int count, struct ompi_datatype_t *datatype, |
| 46 | + int root, struct ompi_communicator_t *comm, |
| 47 | + ompi_request_t ** request, mca_coll_base_module_t * module, |
| 48 | + int ibcast_tag); |
| 49 | +int mca_coll_adapt_ibcast_chain(void *buff, int count, struct ompi_datatype_t *datatype, int root, |
| 50 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 51 | + mca_coll_base_module_t * module, int ibcast_tag); |
| 52 | +int mca_coll_adapt_ibcast_linear(void *buff, int count, struct ompi_datatype_t *datatype, int root, |
| 53 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 54 | + mca_coll_base_module_t * module, int ibcast_tag); |
| 55 | + |
| 56 | + |
| 57 | +/* Reduce */ |
| 58 | +int mca_coll_adapt_ireduce_init(void); |
| 59 | +int mca_coll_adapt_ireduce_fini(void); |
| 60 | +int mca_coll_adapt_reduce(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, |
| 61 | + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, |
| 62 | + mca_coll_base_module_t * module); |
| 63 | +int mca_coll_adapt_ireduce(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, |
| 64 | + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, |
| 65 | + ompi_request_t ** request, mca_coll_base_module_t * module); |
| 66 | +int mca_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count, |
| 67 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, |
| 68 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 69 | + mca_coll_base_module_t * module, ompi_coll_tree_t * tree, |
| 70 | + size_t seg_size, int ireduce_tag); |
| 71 | +int mca_coll_adapt_ireduce_binomial(const void *sbuf, void *rbuf, int count, |
| 72 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, |
| 73 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 74 | + mca_coll_base_module_t * module, int ireduce_tag); |
| 75 | +int mca_coll_adapt_ireduce_in_order_binomial(const void *sbuf, void *rbuf, int count, |
| 76 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, |
| 77 | + int root, struct ompi_communicator_t *comm, |
| 78 | + ompi_request_t ** request, |
| 79 | + mca_coll_base_module_t * module, int ireduce_tag); |
| 80 | +int mca_coll_adapt_ireduce_binary(const void *sbuf, void *rbuf, int count, |
| 81 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, |
| 82 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 83 | + mca_coll_base_module_t * module, int ireduce_tag); |
| 84 | +int mca_coll_adapt_ireduce_pipeline(const void *sbuf, void *rbuf, int count, |
| 85 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, |
| 86 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 87 | + mca_coll_base_module_t * module, int ireduce_tag); |
| 88 | +int mca_coll_adapt_ireduce_chain(const void *sbuf, void *rbuf, int count, |
| 89 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, |
| 90 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 91 | + mca_coll_base_module_t * module, int ireduce_tag); |
| 92 | +int mca_coll_adapt_ireduce_linear(const void *sbuf, void *rbuf, int count, |
| 93 | + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, |
| 94 | + struct ompi_communicator_t *comm, ompi_request_t ** request, |
| 95 | + mca_coll_base_module_t * module, int ireduce_tag); |
0 commit comments