|
17 | 17 | * Copyright (c) 2015 Research Organization for Information Science
|
18 | 18 | * and Technology (RIST). All rights reserved.
|
19 | 19 | * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
|
| 20 | + * Copyright (c) 2017 FUJITSU LIMITED. All rights reserved. |
20 | 21 | * $COPYRIGHT$
|
21 | 22 | *
|
22 | 23 | * Additional copyrights may follow
|
|
39 | 40 |
|
40 | 41 | /* some fixed value index vars to simplify certain operations */
|
41 | 42 | typedef enum COLLTYPE {
|
42 |
| - ALLGATHER = 0, /* 0 */ |
43 |
| - ALLGATHERV, /* 1 */ |
44 |
| - ALLREDUCE, /* 2 */ |
45 |
| - ALLTOALL, /* 3 */ |
46 |
| - ALLTOALLV, /* 4 */ |
47 |
| - ALLTOALLW, /* 5 */ |
48 |
| - BARRIER, /* 6 */ |
49 |
| - BCAST, /* 7 */ |
50 |
| - EXSCAN, /* 8 */ |
51 |
| - GATHER, /* 9 */ |
52 |
| - GATHERV, /* 10 */ |
53 |
| - REDUCE, /* 11 */ |
54 |
| - REDUCESCATTER, /* 12 */ |
55 |
| - SCAN, /* 13 */ |
56 |
| - SCATTER, /* 14 */ |
57 |
| - SCATTERV, /* 15 */ |
58 |
| - COLLCOUNT /* 16 end counter keep it as last element */ |
| 43 | + ALLGATHER = 0, /* 0 */ |
| 44 | + ALLGATHERV, /* 1 */ |
| 45 | + ALLREDUCE, /* 2 */ |
| 46 | + ALLTOALL, /* 3 */ |
| 47 | + ALLTOALLV, /* 4 */ |
| 48 | + ALLTOALLW, /* 5 */ |
| 49 | + BARRIER, /* 6 */ |
| 50 | + BCAST, /* 7 */ |
| 51 | + EXSCAN, /* 8 */ |
| 52 | + GATHER, /* 9 */ |
| 53 | + GATHERV, /* 10 */ |
| 54 | + REDUCE, /* 11 */ |
| 55 | + REDUCESCATTER, /* 12 */ |
| 56 | + REDUCESCATTERBLOCK, /* 13 */ |
| 57 | + SCAN, /* 14 */ |
| 58 | + SCATTER, /* 15 */ |
| 59 | + SCATTERV, /* 16 */ |
| 60 | + NEIGHBOR_ALLGATHER, /* 17 */ |
| 61 | + NEIGHBOR_ALLGATHERV, /* 18 */ |
| 62 | + NEIGHBOR_ALLTOALL, /* 19 */ |
| 63 | + NEIGHBOR_ALLTOALLV, /* 20 */ |
| 64 | + NEIGHBOR_ALLTOALLW, /* 21 */ |
| 65 | + COLLCOUNT /* 22 end counter keep it as last element */ |
59 | 66 | } COLLTYPE_T;
|
60 | 67 |
|
61 | 68 | /* defined arg lists to simply auto inclusion of user overriding decision functions */
|
62 |
| -#define ALLGATHER_ARGS const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
63 |
| -#define ALLGATHERV_ARGS const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void * rbuf, const int *rcounts, const int *disps, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
64 |
| -#define ALLREDUCE_ARGS const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
65 |
| -#define ALLTOALL_ARGS const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
66 |
| -#define ALLTOALLV_ARGS const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
67 |
| -#define ALLTOALLW_ARGS const void *sbuf, const int *scounts, const int *sdisps, struct ompi_datatype_t * const *sdtypes, void *rbuf, const int *rcounts, const int *rdisps, struct ompi_datatype_t * const *rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
68 |
| -#define BARRIER_ARGS struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
69 |
| -#define BCAST_ARGS void *buff, int count, struct ompi_datatype_t *datatype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
70 |
| -#define EXSCAN_ARGS const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
71 |
| -#define GATHER_ARGS const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
72 |
| -#define GATHERV_ARGS void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
73 |
| -#define REDUCE_ARGS const void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
74 |
| -#define REDUCESCATTER_ARGS const void *sbuf, void *rbuf, const int *rcounts, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
75 |
| -#define SCAN_ARGS const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
76 |
| -#define SCATTER_ARGS const void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
77 |
| -#define SCATTERV_ARGS const void *sbuf, const int *scounts, const int *disps, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module |
| 69 | +#define ALLGATHER_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 70 | +#define ALLGATHERV_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, const int recvcounts[], const int displs[], struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 71 | +#define ALLREDUCE_BASE_ARGS const void *sendbuf, void *recvbuf, int count, struct ompi_datatype_t *datatype, struct ompi_op_t *op, struct ompi_communicator_t *comm |
| 72 | +#define ALLTOALL_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 73 | +#define ALLTOALLV_BASE_ARGS const void *sendbuf, const int sendcounts[], const int sdispls[], struct ompi_datatype_t *sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 74 | +#define ALLTOALLW_BASE_ARGS const void *sendbuf, const int sendcounts[], const int sdispls[], struct ompi_datatype_t * const sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], struct ompi_datatype_t * const recvtypes[], struct ompi_communicator_t *comm |
| 75 | +#define BARRIER_BASE_ARGS struct ompi_communicator_t *comm |
| 76 | +#define BCAST_BASE_ARGS void *buffer, int count, struct ompi_datatype_t *datatype, int root, struct ompi_communicator_t *comm |
| 77 | +#define EXSCAN_BASE_ARGS const void *sendbuf, void *recvbuf, int count, struct ompi_datatype_t *datatype, struct ompi_op_t *op, struct ompi_communicator_t *comm |
| 78 | +#define GATHER_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, int root, struct ompi_communicator_t *comm |
| 79 | +#define GATHERV_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, const int recvcounts[], const int displs[], struct ompi_datatype_t *recvtype, int root, struct ompi_communicator_t *comm |
| 80 | +#define REDUCE_BASE_ARGS const void *sendbuf, void *recvbuf, int count, struct ompi_datatype_t *datatype, struct ompi_op_t *op, int root, struct ompi_communicator_t *comm |
| 81 | +#define REDUCESCATTER_BASE_ARGS const void *sendbuf, void *recvbuf, const int recvcounts[], struct ompi_datatype_t *datatype, struct ompi_op_t *op, struct ompi_communicator_t *comm |
| 82 | +#define REDUCESCATTERBLOCK_BASE_ARGS const void *sendbuf, void *recvbuf, int recvcount, struct ompi_datatype_t *datatype, struct ompi_op_t *op, struct ompi_communicator_t *comm |
| 83 | +#define SCAN_BASE_ARGS const void *sendbuf, void *recvbuf, int count, struct ompi_datatype_t *datatype, struct ompi_op_t *op, struct ompi_communicator_t *comm |
| 84 | +#define SCATTER_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, int root, struct ompi_communicator_t *comm |
| 85 | +#define SCATTERV_BASE_ARGS const void *sendbuf, const int sendcounts[], const int displs[], struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, int root, struct ompi_communicator_t *comm |
| 86 | +#define NEIGHBOR_ALLGATHER_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 87 | +#define NEIGHBOR_ALLGATHERV_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, const int recvcounts[], const int displs[], struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 88 | +#define NEIGHBOR_ALLTOALL_BASE_ARGS const void *sendbuf, int sendcount, struct ompi_datatype_t *sendtype, void *recvbuf, int recvcount, struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 89 | +#define NEIGHBOR_ALLTOALLV_BASE_ARGS const void *sendbuf, const int sendcounts[], const int sdispls[], struct ompi_datatype_t *sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], struct ompi_datatype_t *recvtype, struct ompi_communicator_t *comm |
| 90 | +#define NEIGHBOR_ALLTOALLW_BASE_ARGS const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], struct ompi_datatype_t * const sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], struct ompi_datatype_t * const recvtypes[], struct ompi_communicator_t *comm |
| 91 | + |
| 92 | +#define ALLGATHER_ARGS ALLGATHER_BASE_ARGS, mca_coll_base_module_t *module |
| 93 | +#define ALLGATHERV_ARGS ALLGATHERV_BASE_ARGS, mca_coll_base_module_t *module |
| 94 | +#define ALLREDUCE_ARGS ALLREDUCE_BASE_ARGS, mca_coll_base_module_t *module |
| 95 | +#define ALLTOALL_ARGS ALLTOALL_BASE_ARGS, mca_coll_base_module_t *module |
| 96 | +#define ALLTOALLV_ARGS ALLTOALLV_BASE_ARGS, mca_coll_base_module_t *module |
| 97 | +#define ALLTOALLW_ARGS ALLTOALLW_BASE_ARGS, mca_coll_base_module_t *module |
| 98 | +#define BARRIER_ARGS BARRIER_BASE_ARGS, mca_coll_base_module_t *module |
| 99 | +#define BCAST_ARGS BCAST_BASE_ARGS, mca_coll_base_module_t *module |
| 100 | +#define EXSCAN_ARGS EXSCAN_BASE_ARGS, mca_coll_base_module_t *module |
| 101 | +#define GATHER_ARGS GATHER_BASE_ARGS, mca_coll_base_module_t *module |
| 102 | +#define GATHERV_ARGS GATHERV_BASE_ARGS, mca_coll_base_module_t *module |
| 103 | +#define REDUCE_ARGS REDUCE_BASE_ARGS, mca_coll_base_module_t *module |
| 104 | +#define REDUCESCATTER_ARGS REDUCESCATTER_BASE_ARGS, mca_coll_base_module_t *module |
| 105 | +#define REDUCESCATTERBLOCK_ARGS REDUCESCATTERBLOCK_BASE_ARGS, mca_coll_base_module_t *module |
| 106 | +#define SCAN_ARGS SCAN_BASE_ARGS, mca_coll_base_module_t *module |
| 107 | +#define SCATTER_ARGS SCATTER_BASE_ARGS, mca_coll_base_module_t *module |
| 108 | +#define SCATTERV_ARGS SCATTERV_BASE_ARGS, mca_coll_base_module_t *module |
| 109 | +#define NEIGHBOR_ALLGATHER_ARGS NEIGHBOR_ALLGATHER_BASE_ARGS, mca_coll_base_module_t *module |
| 110 | +#define NEIGHBOR_ALLGATHERV_ARGS NEIGHBOR_ALLGATHERV_BASE_ARGS, mca_coll_base_module_t *module |
| 111 | +#define NEIGHBOR_ALLTOALL_ARGS NEIGHBOR_ALLTOALL_BASE_ARGS, mca_coll_base_module_t *module |
| 112 | +#define NEIGHBOR_ALLTOALLV_ARGS NEIGHBOR_ALLTOALLV_BASE_ARGS, mca_coll_base_module_t *module |
| 113 | +#define NEIGHBOR_ALLTOALLW_ARGS NEIGHBOR_ALLTOALLW_BASE_ARGS, mca_coll_base_module_t *module |
| 114 | + |
| 115 | +#define IALLGATHER_ARGS ALLGATHER_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 116 | +#define IALLGATHERV_ARGS ALLGATHERV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 117 | +#define IALLREDUCE_ARGS ALLREDUCE_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 118 | +#define IALLTOALL_ARGS ALLTOALL_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 119 | +#define IALLTOALLV_ARGS ALLTOALLV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 120 | +#define IALLTOALLW_ARGS ALLTOALLW_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 121 | +#define IBARRIER_ARGS BARRIER_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 122 | +#define IBCAST_ARGS BCAST_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 123 | +#define IEXSCAN_ARGS EXSCAN_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 124 | +#define IGATHER_ARGS GATHER_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 125 | +#define IGATHERV_ARGS GATHERV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 126 | +#define IREDUCE_ARGS REDUCE_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 127 | +#define IREDUCESCATTER_ARGS REDUCESCATTER_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 128 | +#define IREDUCESCATTERBLOCK_ARGS REDUCESCATTERBLOCK_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 129 | +#define ISCAN_ARGS SCAN_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 130 | +#define ISCATTER_ARGS SCATTER_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 131 | +#define ISCATTERV_ARGS SCATTERV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 132 | +#define INEIGHBOR_ALLGATHER_ARGS NEIGHBOR_ALLGATHER_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 133 | +#define INEIGHBOR_ALLGATHERV_ARGS NEIGHBOR_ALLGATHERV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 134 | +#define INEIGHBOR_ALLTOALL_ARGS NEIGHBOR_ALLTOALL_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 135 | +#define INEIGHBOR_ALLTOALLV_ARGS NEIGHBOR_ALLTOALLV_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 136 | +#define INEIGHBOR_ALLTOALLW_ARGS NEIGHBOR_ALLTOALLW_BASE_ARGS, ompi_request_t **request, mca_coll_base_module_t *module |
| 137 | + |
| 138 | +#define ALLGATHER_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm |
| 139 | +#define ALLGATHERV_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm |
| 140 | +#define ALLREDUCE_BASE_ARG_NAMES sendbuf, recvbuf, count, datatype, op, comm |
| 141 | +#define ALLTOALL_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm |
| 142 | +#define ALLTOALLV_BASE_ARG_NAMES sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm |
| 143 | +#define ALLTOALLW_BASE_ARG_NAMES sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm |
| 144 | +#define BARRIER_BASE_ARG_NAMES comm |
| 145 | +#define BCAST_BASE_ARG_NAMES buffer, count, datatype, root, comm |
| 146 | +#define EXSCAN_BASE_ARG_NAMES sendbuf, recvbuf, count, datatype, op, comm |
| 147 | +#define GATHER_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm |
| 148 | +#define GATHERV_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm |
| 149 | +#define REDUCE_BASE_ARG_NAMES sendbuf, recvbuf, count, datatype, op, root, comm |
| 150 | +#define REDUCESCATTER_BASE_ARG_NAMES sendbuf, recvbuf, recvcounts, datatype, op, comm |
| 151 | +#define REDUCESCATTERBLOCK_BASE_ARG_NAMES sendbuf, recvbuf, recvcount, datatype, op, comm |
| 152 | +#define SCAN_BASE_ARG_NAMES sendbuf, recvbuf, count, datatype, op, comm |
| 153 | +#define SCATTER_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm |
| 154 | +#define SCATTERV_BASE_ARG_NAMES sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm |
| 155 | +#define NEIGHBOR_ALLGATHER_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm |
| 156 | +#define NEIGHBOR_ALLGATHERV_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm |
| 157 | +#define NEIGHBOR_ALLTOALL_BASE_ARG_NAMES sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm |
| 158 | +#define NEIGHBOR_ALLTOALLV_BASE_ARG_NAMES sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm |
| 159 | +#define NEIGHBOR_ALLTOALLW_BASE_ARG_NAMES sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm |
78 | 160 | /* end defined arg lists to simply auto inclusion of user overriding decision functions */
|
79 | 161 |
|
80 | 162 | BEGIN_C_DECLS
|
|
0 commit comments