File indexing completed on 2024-12-17 18:39:42 UTC
view on githubraw file Latest commit b4daa243 on 2023-05-28 03:53:22 UTC
b4daa24319 Shre*0001 /*
0002 ##########################################################
0003 # This file is part of the AdjoinableMPI library #
0004 # released under the MIT License. #
0005 # The full COPYRIGHT notice can be found in the top #
0006 # level directory of the AdjoinableMPI distribution. #
0007 ##########################################################
0008
0009 #ifndef _AMPI_LIBCOMMON_MODIFIED_H_
0010 #define _AMPI_LIBCOMMON_MODIFIED_H_
0011
0012 /**
0013 * \file
0014 * common AD implementation portion of AMPI routines from ampi/userIF/modifief.h
0015 */
0016
0017 #include <mpi.h>
0018
0019 #if defined(__cplusplus)
0020 extern "C" {
0021 #endif
0022
0023 #include "ampi/userIF/pairedWith.h"
0024 #include "ampi/userIF/request.h"
0025 #include "ampi/userIF/window.h"
0026 #include "ampi/adTool/support.h"
0027
0028 /**
0029 * forward sweep variant of \ref AMPI_Recv
0030 */
0031 int FW_AMPI_Recv(void* buf,
0032 int count,
0033 MPI_Datatype datatype,
0034 int src,
0035 int tag,
0036 AMPI_PairedWith pairedWith,
0037 MPI_Comm comm,
0038 MPI_Status* status);
0039
0040 /**
0041 * backward sweep variant of \ref AMPI_Recv
0042 */
0043 int BW_AMPI_Recv(void* buf,
0044 int count,
0045 MPI_Datatype datatype,
0046 int src,
0047 int tag,
0048 AMPI_PairedWith pairedWith,
0049 MPI_Comm comm,
0050 MPI_Status* status);
0051
0052 /**
0053 * TLM variant of \ref AMPI_Recv
0054 */
0055 int TLM_AMPI_Recv(void* buf,
0056 int count,
0057 MPI_Datatype datatype,
0058 int src,
0059 int tag,
0060 AMPI_PairedWith pairedWith,
0061 MPI_Comm comm,
0062 MPI_Status* status);
0063
0064 /**
0065 * Tangent Recv, with separate shadow (i.e. tangent) buffer.
0066 */
0067 int TLS_AMPI_Recv(void* buf, void* shadowbuf,
0068 int count,
0069 MPI_Datatype datatype, MPI_Datatype shadowdatatype,
0070 int src,
0071 int tag,
0072 AMPI_PairedWith pairedWith,
0073 MPI_Comm comm,
0074 MPI_Status* status) ;
0075
0076 /**
0077 * forward sweep variant of \ref AMPI_Irecv
0078 */
0079 int FW_AMPI_Irecv (void* buf,
0080 int count,
0081 MPI_Datatype datatype,
0082 int source,
0083 int tag,
0084 AMPI_PairedWith pairedWith,
0085 MPI_Comm comm,
0086 AMPI_Request* request);
0087
0088 /**
0089 * backward sweep variant of \ref AMPI_Irecv
0090 */
0091 int BW_AMPI_Irecv (void* buf,
0092 int count,
0093 MPI_Datatype datatype,
0094 int source,
0095 int tag,
0096 AMPI_PairedWith pairedWith,
0097 MPI_Comm comm,
0098 AMPI_Request* request);
0099
0100 /**
0101 * TLM variant of \ref AMPI_Irecv
0102 */
0103 int TLM_AMPI_Irecv (void* buf,
0104 int count,
0105 MPI_Datatype datatype,
0106 int source,
0107 int tag,
0108 AMPI_PairedWith pairedWith,
0109 MPI_Comm comm,
0110 AMPI_Request* request);
0111
0112 /**
0113 * Tangent Irecv, with separate shadow (i.e. tangent) buffer.
0114 */
0115 int TLS_AMPI_Irecv (void* buf, void* shadowbuf,
0116 int count,
0117 MPI_Datatype datatype, MPI_Datatype shadowdatatype,
0118 int source,
0119 int tag,
0120 AMPI_PairedWith pairedWith,
0121 MPI_Comm comm,
0122 AMPI_Request* request) ;
0123
0124 /**
0125 * forward sweep variant of \ref AMPI_Send
0126 */
0127 int FW_AMPI_Send (void* buf,
0128 int count,
0129 MPI_Datatype datatype,
0130 int dest,
0131 int tag,
0132 AMPI_PairedWith pairedWith,
0133 MPI_Comm comm);
0134
0135 /**
0136 * backward sweep variant of \ref AMPI_Send
0137 */
0138 int BW_AMPI_Send (void* buf,
0139 int count,
0140 MPI_Datatype datatype,
0141 int dest,
0142 int tag,
0143 AMPI_PairedWith pairedWith,
0144 MPI_Comm comm);
0145
0146 /**
0147 * TLM variant of \ref AMPI_Send
0148 */
0149 int TLM_AMPI_Send (void* buf,
0150 int count,
0151 MPI_Datatype datatype,
0152 int dest,
0153 int tag,
0154 AMPI_PairedWith pairedWith,
0155 MPI_Comm comm);
0156
0157 /**
0158 * Tangent Send, with separate shadow (i.e. tangent) buffer.
0159 */
0160 int TLS_AMPI_Send (void* buf, void* shadowbuf,
0161 int count,
0162 MPI_Datatype datatype, MPI_Datatype shadowdatatype,
0163 int dest,
0164 int tag,
0165 AMPI_PairedWith pairedWith,
0166 MPI_Comm comm);
0167
0168 /**
0169 * forward sweep variant of \ref AMPI_Isend
0170 */
0171 int FW_AMPI_Isend (void* buf,
0172 int count,
0173 MPI_Datatype datatype,
0174 int dest,
0175 int tag,
0176 AMPI_PairedWith pairedWith,
0177 MPI_Comm comm,
0178 AMPI_Request* request);
0179
0180 /**
0181 * backward sweep variant of \ref AMPI_Isend
0182 */
0183 int BW_AMPI_Isend (void* buf,
0184 int count,
0185 MPI_Datatype datatype,
0186 int dest,
0187 int tag,
0188 AMPI_PairedWith pairedWith,
0189 MPI_Comm comm,
0190 AMPI_Request* request);
0191
0192 /**
0193 * TLM variant of \ref AMPI_Isend
0194 */
0195 int TLM_AMPI_Isend (void* buf,
0196 int count,
0197 MPI_Datatype datatype,
0198 int dest,
0199 int tag,
0200 AMPI_PairedWith pairedWith,
0201 MPI_Comm comm,
0202 AMPI_Request* request);
0203
0204 /**
0205 * Tangent Isend, with separate shadow (i.e. tangent) buffer.
0206 */
0207 int TLS_AMPI_Isend (void* buf, void* shadowbuf,
0208 int count,
0209 MPI_Datatype datatype, MPI_Datatype shadowdatatype,
0210 int dest,
0211 int tag,
0212 AMPI_PairedWith pairedWith,
0213 MPI_Comm comm,
0214 AMPI_Request* request);
0215
0216 /**
0217 * forward sweep variant of \ref AMPI_Wait
0218 */
0219 int FW_AMPI_Wait(AMPI_Request *request,
0220 MPI_Status *status);
0221
0222 /**
0223 * backward sweep variant of \ref AMPI_Wait
0224 */
0225 int BW_AMPI_Wait(AMPI_Request *request,
0226 MPI_Status *status);
0227
0228 /**
0229 * TLM variant of \ref AMPI_Wait
0230 */
0231 int TLM_AMPI_Wait(AMPI_Request *request,
0232 MPI_Status *status);
0233
0234 /**
0235 * Tangent Wait, with separate shadow (i.e. tangent) buffer.
0236 */
0237 int TLS_AMPI_Wait(AMPI_Request *request,
0238 MPI_Status *status);
0239
0240 /**
0241 * forward sweep variant of \ref AMPI_Barrier
0242 */
0243 int FW_AMPI_Barrier(MPI_Comm comm);
0244
0245 /**
0246 * backward sweep variant of \ref AMPI_Barrier
0247 */
0248 int BW_AMPI_Barrier(MPI_Comm comm);
0249
0250 /**
0251 * TLM variant of \ref AMPI_Barrier
0252 */
0253 int TLM_AMPI_Barrier(MPI_Comm comm);
0254
0255 /**
0256 * TLS variant of \ref AMPI_Barrier
0257 */
0258 int TLS_AMPI_Barrier(MPI_Comm comm);
0259
0260 /**
0261 * forward sweep variant of \ref AMPI_Gather
0262 */
0263 int FW_AMPI_Gather(void *sendbuf,
0264 int sendcnt,
0265 MPI_Datatype sendtype,
0266 void *recvbuf,
0267 int recvcnt,
0268 MPI_Datatype recvtype,
0269 int root,
0270 MPI_Comm comm);
0271
0272 /**
0273 * backward sweep variant of \ref AMPI_Gather
0274 */
0275 int BW_AMPI_Gather(void *sendbuf,
0276 int sendcnt,
0277 MPI_Datatype sendtype,
0278 void *recvbuf,
0279 int recvcnt,
0280 MPI_Datatype recvtype,
0281 int root,
0282 MPI_Comm comm);
0283
0284 /**
0285 * TLM variant of \ref AMPI_Gather. Bundled (Association-by-Address).
0286 */
0287 int TLM_AMPI_Gather(void *sendbuf,
0288 int sendcnt,
0289 MPI_Datatype sendtype,
0290 void *recvbuf,
0291 int recvcnt,
0292 MPI_Datatype recvtype,
0293 int root,
0294 MPI_Comm comm);
0295
0296 /**
0297 * Tangent diff variant of \ref AMPI_Gather. Shadowed (Association-by-Name)
0298 */
0299 int TLS_AMPI_Gather(void *sendbuf, void *shadowsendbuf,
0300 int sendcnt,
0301 MPI_Datatype sendtype, MPI_Datatype shadowsendtype,
0302 void *recvbuf, void *shadowrecvbuf,
0303 int recvcnt,
0304 MPI_Datatype recvtype, MPI_Datatype shadowrecvtype,
0305 int root,
0306 MPI_Comm comm);
0307
0308 /**
0309 * forward sweep variant of \ref AMPI_Scatter
0310 */
0311 int FW_AMPI_Scatter(void *sendbuf,
0312 int sendcnt,
0313 MPI_Datatype sendtype,
0314 void *recvbuf,
0315 int recvcnt,
0316 MPI_Datatype recvtype,
0317 int root,
0318 MPI_Comm comm);
0319
0320 /**
0321 * backward sweep variant of \ref AMPI_Scatter
0322 */
0323 int BW_AMPI_Scatter(void *sendbuf,
0324 int sendcnt,
0325 MPI_Datatype sendtype,
0326 void *recvbuf,
0327 int recvcnt,
0328 MPI_Datatype recvtype,
0329 int root,
0330 MPI_Comm comm);
0331
0332 /**
0333 * TLM variant of \ref AMPI_Scatter. Bundled (Association-by-Address)
0334 */
0335 int TLM_AMPI_Scatter(void *sendbuf,
0336 int sendcnt,
0337 MPI_Datatype sendtype,
0338 void *recvbuf,
0339 int recvcnt,
0340 MPI_Datatype recvtype,
0341 int root,
0342 MPI_Comm comm);
0343
0344 /**
0345 * Tangent diff variant of \ref AMPI_Scatter. Shadowed (Association-by-Name)
0346 */
0347 int TLS_AMPI_Scatter(void *sendbuf, void *shadowsendbuf,
0348 int sendcnt,
0349 MPI_Datatype sendtype, MPI_Datatype shadowsendtype,
0350 void *recvbuf, void *shadowrecvbuf,
0351 int recvcnt,
0352 MPI_Datatype recvtype, MPI_Datatype shadowrecvtype,
0353 int root,
0354 MPI_Comm comm);
0355
0356 /**
0357 * forward sweep variant of \ref AMPI_Allgather
0358 */
0359 int FW_AMPI_Allgather(void *sendbuf,
0360 int sendcount,
0361 MPI_Datatype sendtype,
0362 void *recvbuf,
0363 int recvcount,
0364 MPI_Datatype recvtype,
0365 MPI_Comm comm);
0366
0367 /**
0368 * backward sweep variant of \ref AMPI_Allgather
0369 */
0370 int BW_AMPI_Allgather(void *sendbuf,
0371 int sendcount,
0372 MPI_Datatype sendtype,
0373 void *recvbuf,
0374 int recvcount,
0375 MPI_Datatype recvtype,
0376 MPI_Comm comm);
0377
0378 /**
0379 * TLM variant of \ref AMPI_Allgather. Bundled (Association-by-Address)
0380 */
0381 int TLM_AMPI_Allgather(void *sendbuf,
0382 int sendcount,
0383 MPI_Datatype sendtype,
0384 void *recvbuf,
0385 int recvcount,
0386 MPI_Datatype recvtype,
0387 MPI_Comm comm);
0388
0389 /**
0390 * Tangent diff variant of \ref AMPI_Allgather. Shadowed (Association-by-Name)
0391 */
0392 int TLS_AMPI_Allgather(void *sendbuf, void *shadowsendbuf,
0393 int sendcount,
0394 MPI_Datatype sendtype, MPI_Datatype shadowsendtype,
0395 void *recvbuf, void *shadowrecvbuf,
0396 int recvcount,
0397 MPI_Datatype recvtype, MPI_Datatype shadowrecvtype,
0398 MPI_Comm comm);
0399
0400 /**
0401 * forward sweep variant of \ref AMPI_Gatherv
0402 */
0403 int FW_AMPI_Gatherv(void *sendbuf,
0404 int sendcnt,
0405 MPI_Datatype sendtype,
0406 void *recvbuf,
0407 int *recvcnts,
0408 int *displs,
0409 MPI_Datatype recvtype,
0410 int root,
0411 MPI_Comm comm);
0412
0413 /**
0414 * backward sweep variant of \ref AMPI_Gatherv
0415 * NOTE: recvcnts and displs are passed with a non-NULL pointer then they must be allocated to the correct size
0416 */
0417 int BW_AMPI_Gatherv(void *sendbuf,
0418 int sendcnt,
0419 MPI_Datatype sendtype,
0420 void *recvbuf,
0421 int *recvcnts,
0422 int *displs,
0423 MPI_Datatype recvtype,
0424 int root,
0425 MPI_Comm comm);
0426
0427 /**
0428 * TLM variant of \ref AMPI_Gatherv. Bundled (Association-by-Address)
0429 */
0430 int TLM_AMPI_Gatherv(void *sendbuf,
0431 int sendcnt,
0432 MPI_Datatype sendtype,
0433 void *recvbuf,
0434 int *recvcnts,
0435 int *displs,
0436 MPI_Datatype recvtype,
0437 int root,
0438 MPI_Comm comm);
0439
0440 /**
0441 * Tangent diff variant of \ref AMPI_Gatherv. Shadowed (Association-by-Name)
0442 */
0443 int TLS_AMPI_Gatherv(void *sendbuf, void *shadowsendbuf,
0444 int sendcnt,
0445 MPI_Datatype sendtype, MPI_Datatype shadowsendtype,
0446 void *recvbuf, void *shadowrecvbuf,
0447 int *recvcnts,
0448 int *displs, int *shadowdispls,
0449 MPI_Datatype recvtype, MPI_Datatype shadowrecvtype,
0450 int root,
0451 MPI_Comm comm) ;
0452
0453 /**
0454 * forward sweep variant of \ref AMPI_Scatterv
0455 */
0456 int FW_AMPI_Scatterv(void *sendbuf,
0457 int *sendcnts,
0458 int *displs,
0459 MPI_Datatype sendtype,
0460 void *recvbuf,
0461 int recvcnt,
0462 MPI_Datatype recvtype,
0463 int root, MPI_Comm comm);
0464
0465 /**
0466 * backward sweep variant of \ref AMPI_Scatterv
0467 * NOTE: sendcnts and displs are passed with a non-NULL pointer then they must be allocated to the correct size
0468 */
0469 int BW_AMPI_Scatterv(void *sendbuf,
0470 int *sendcnts,
0471 int *displs,
0472 MPI_Datatype sendtype,
0473 void *recvbuf,
0474 int recvcnt,
0475 MPI_Datatype recvtype,
0476 int root, MPI_Comm comm);
0477
0478 /**
0479 * TLM variant of \ref AMPI_Scatterv. Bundled (Association-by-Address)
0480 * NOTE: sendcnts and displs are passed with a non-NULL pointer then they must be allocated to the correct size
0481 */
0482 int TLM_AMPI_Scatterv(void *sendbuf,
0483 int *sendcnts,
0484 int *displs,
0485 MPI_Datatype sendtype,
0486 void *recvbuf,
0487 int recvcnt,
0488 MPI_Datatype recvtype,
0489 int root, MPI_Comm comm);
0490
0491 /**
0492 * Tangent diff variant of \ref AMPI_Scatterv. Shadowed (Association-by-Name)
0493 */
0494 int TLS_AMPI_Scatterv(void *sendbuf, void *shadowsendbuf,
0495 int *sendcnts,
0496 int *displs, int *shadowdispls,
0497 MPI_Datatype sendtype, MPI_Datatype shadowsendtype,
0498 void *recvbuf, void *shadowrecvbuf,
0499 int recvcnt,
0500 MPI_Datatype recvtype, MPI_Datatype shadowrecvtype,
0501 int root, MPI_Comm comm);
0502
0503 /**
0504 * forward sweep variant of \ref AMPI_Allgatherv
0505 */
0506 int FW_AMPI_Allgatherv(void *sendbuf,
0507 int sendcnt,
0508 MPI_Datatype sendtype,
0509 void *recvbuf,
0510 int *recvcnts,
0511 int *displs,
0512 MPI_Datatype recvtype,
0513 MPI_Comm comm);
0514
0515 /**
0516 * backward sweep variant of \ref AMPI_Allgatherv
0517 * NOTE: recvcnts and displs are passed with a non-NULL pointer then they must be allocated to the correct size
0518 */
0519 int BW_AMPI_Allgatherv(void *sendbuf,
0520 int sendcnt,
0521 MPI_Datatype sendtype,
0522 void *recvbuf,
0523 int *recvcnts,
0524 int *displs,
0525 MPI_Datatype recvtype,
0526 MPI_Comm comm);
0527
0528 /**
0529 * TLM variant of \ref AMPI_Allgatherv. Bundled (Association-by-Address)
0530 * NOTE: recvcnts and displs are passed with a non-NULL pointer then they must be allocated to the correct size
0531 */
0532 int TLM_AMPI_Allgatherv(void *sendbuf,
0533 int sendcnt,
0534 MPI_Datatype sendtype,
0535 void *recvbuf,
0536 int *recvcnts,
0537 int *displs,
0538 MPI_Datatype recvtype,
0539 MPI_Comm comm);
0540
0541 /**
0542 * Tangent diff variant of \ref AMPI_Allgatherv. Shadowed (Association-by-Name)
0543 */
0544 int TLS_AMPI_Allgatherv(void *sendbuf, void *shadowsendbuf,
0545 int sendcnt,
0546 MPI_Datatype sendtype, MPI_Datatype shadowsendtype,
0547 void *recvbuf, void *shadowrecvbuf,
0548 int *recvcnts,
0549 int *displs, int *shadowdispls,
0550 MPI_Datatype recvtype, MPI_Datatype shadowrecvtype,
0551 MPI_Comm comm);
0552
0553 /**
0554 * forward sweep variant of \ref AMPI_Bcast
0555 */
0556 int FW_AMPI_Bcast(void* buf,
0557 int count,
0558 MPI_Datatype datatype,
0559 int root,
0560 MPI_Comm comm);
0561
0562 /**
0563 * backward sweep variant of \ref AMPI_Bcast
0564 */
0565 int BW_AMPI_Bcast(void* buf,
0566 int count,
0567 MPI_Datatype datatype,
0568 int root,
0569 MPI_Comm comm);
0570
0571 /**
0572 * TLM variant of \ref AMPI_Bcast. Bundled (Association-by-Address)
0573 */
0574 int TLM_AMPI_Bcast(void* buf,
0575 int count,
0576 MPI_Datatype datatype,
0577 int root,
0578 MPI_Comm comm);
0579
0580 /**
0581 * Tangent diff variant of \ref AMPI_Bcast. Shadowed (Association-by-Name)
0582 */
0583 int TLS_AMPI_Bcast(void* buf, void* shadowbuf,
0584 int count,
0585 MPI_Datatype datatype, MPI_Datatype shadowdatatype,
0586 int root,
0587 MPI_Comm comm);
0588
0589 /**
0590 * Adjoint forward sweep of \ref AMPI_Reduce. Bundled (Association-by-Address)
0591 */
0592 int FWB_AMPI_Reduce(void* sbuf,
0593 void* rbuf,
0594 int count,
0595 MPI_Datatype datatype,
0596 MPI_Op op,
0597 int root,
0598 MPI_Comm comm);
0599
0600 /**
0601 * Adjoint forward sweep of \ref AMPI_Reduce. Shadowed (Association-by-Name).
0602 * NOTE: in the forward sweep, shadowed mode passes only the primal values.
0603 */
0604 int FW_AMPI_Reduce(void* sbuf,
0605 void* rbuf,
0606 int count,
0607 MPI_Datatype datatype,
0608 MPI_Op op,
0609 int root,
0610 MPI_Comm comm) ;
0611
0612
0613 /**
0614 * Adjoint backward sweep of \ref AMPI_Reduce. Bundled (Association-by-Address)
0615 */
0616 int BWB_AMPI_Reduce(void* sbuf,
0617 void* rbuf,
0618 int count,
0619 MPI_Datatype datatype,
0620 MPI_Op op,
0621 int root,
0622 MPI_Comm comm);
0623
0624 /**
0625 * Adjoint backward sweep of \ref AMPI_Reduce. Shadowed (Association-by-Name)
0626 */
0627 int BWS_AMPI_Reduce(void* sbuf, void* sbufb,
0628 void* rbuf, void* rbufb,
0629 int count,
0630 MPI_Datatype datatype, MPI_Datatype datatypeb,
0631 MPI_Op op, TLM_userFunctionF* uopd,
0632 int root,
0633 MPI_Comm comm) ;
0634
0635 /**
0636 * Tangent diff of \ref AMPI_Reduce. Bundled (Association-by-Address)
0637 */
0638 int TLB_AMPI_Reduce(void* sbuf,
0639 void* rbuf,
0640 int count,
0641 MPI_Datatype datatype,
0642 MPI_Op op,
0643 int root,
0644 MPI_Comm comm);
0645
0646 /**
0647 * Tangent diff of \ref AMPI_Reduce. Shadowed (Association-by-Name)
0648 */
0649 int TLS_AMPI_Reduce(void* sbuf, void* sbufd,
0650 void* rbuf, void* rbufd,
0651 int count,
0652 MPI_Datatype datatype, MPI_Datatype datatyped,
0653 MPI_Op op, TLM_userFunctionF* uopd,
0654 int root,
0655 MPI_Comm comm) ;
0656
0657 /**
0658 * forward sweep variant of \ref AMPI_Allreduce
0659 */
0660 int FWB_AMPI_Allreduce(void* sbuf,
0661 void* rbuf,
0662 int count,
0663 MPI_Datatype datatype,
0664 MPI_Op op,
0665 MPI_Comm comm);
0666
0667 /**
0668 * Adjoint forward sweep of \ref AMPI_Allreduce, shadowed (i.e. Association-by-Name)
0669 * NOTE: in the forward sweep, shadowed mode passes only the primal values.
0670 */
0671 int FW_AMPI_Allreduce(void* sbuf,
0672 void* rbuf,
0673 int count,
0674 MPI_Datatype datatype,
0675 MPI_Op op,
0676 MPI_Comm comm);
0677
0678 /**
0679 * backward sweep variant of \ref AMPI_Allreduce
0680 */
0681 int BWB_AMPI_Allreduce(void* sbuf,
0682 void* rbuf,
0683 int count,
0684 MPI_Datatype datatype,
0685 MPI_Op op,
0686 MPI_Comm comm);
0687
0688 /**
0689 * Adjoint forward sweep of \ref AMPI_Allreduce, shadowed (i.e. Association-by-Name)
0690 */
0691 int BWS_AMPI_Allreduce(void* sbuf, void* sbufb,
0692 void* rbuf, void* rbufb,
0693 int count,
0694 MPI_Datatype datatype, MPI_Datatype datatypeb,
0695 MPI_Op op, TLM_userFunctionF* uopb,
0696 MPI_Comm comm);
0697
0698 /**
0699 * TLM variant of \ref AMPI_Allreduce
0700 */
0701 int TLB_AMPI_Allreduce(void* sbuf,
0702 void* rbuf,
0703 int count,
0704 MPI_Datatype datatype,
0705 MPI_Op op,
0706 MPI_Comm comm);
0707
0708 /**
0709 * Adjoint forward sweep of \ref AMPI_Allreduce, shadowed (i.e. Association-by-Name)
0710 */
0711 int TLS_AMPI_Allreduce(void* sbuf, void* sbufd,
0712 void* rbuf, void* rbufd,
0713 int count,
0714 MPI_Datatype datatype, MPI_Datatype datatyped,
0715 MPI_Op op, TLM_userFunctionF* uopd,
0716 MPI_Comm comm) ;
0717
0718 /**
0719 * create struct, calls MPI_Type_create_struct twice (second time for packed typemap) and stores info
0720 */
0721 int AMPI_Type_create_struct (int count,
0722 int array_of_blocklengths[],
0723 MPI_Aint array_of_displacements[],
0724 MPI_Datatype array_of_types[],
0725 MPI_Datatype *newtype);
0726
0727 int AMPI_Type_create_resized (MPI_Datatype oldtype,
0728 MPI_Aint lb,
0729 MPI_Aint extent,
0730 MPI_Datatype *newtype);
0731
0732 /**
0733 * create reduction op, calls MPI_Op_create, stores info
0734 */
0735 int AMPI_Op_create(MPI_User_function *function,
0736 int commute,
0737 MPI_Op *op);
0738
0739 /**
0740 * One-sided MPI
0741 */
0742
0743
0744 int FW_AMPI_Win_create( void *base,
0745 MPI_Aint size,
0746 int disp_unit,
0747 MPI_Info info,
0748 MPI_Comm comm,
0749 AMPI_Win *win
0750 );
0751
0752 int BW_AMPI_Win_create( void *base,
0753 MPI_Aint size,
0754 int disp_unit,
0755 MPI_Info info,
0756 MPI_Comm comm,
0757 AMPI_Win *win
0758 );
0759
0760 int FW_AMPI_Win_free( AMPI_Win *win );
0761
0762 int BW_AMPI_Win_free( AMPI_Win *win );
0763
0764 int FW_AMPI_Get( void *origin_addr,
0765 int origin_count,
0766 MPI_Datatype origin_datatype,
0767 int target_rank,
0768 MPI_Aint target_disp,
0769 int target_count,
0770 MPI_Datatype target_datatype,
0771 AMPI_Win win
0772 );
0773
0774 int BW_AMPI_Get( void *origin_addr,
0775 int origin_count,
0776 MPI_Datatype origin_datatype,
0777 int target_rank,
0778 MPI_Aint target_disp,
0779 int target_count,
0780 MPI_Datatype target_datatype,
0781 AMPI_Win win
0782 );
0783
0784 int FW_AMPI_Get( void *origin_addr,
0785 int origin_count,
0786 MPI_Datatype origin_datatype,
0787 int target_rank,
0788 MPI_Aint target_disp,
0789 int target_count,
0790 MPI_Datatype target_datatype,
0791 AMPI_Win win
0792 );
0793
0794 int BW_AMPI_Put( void *origin_addr,
0795 int origin_count,
0796 MPI_Datatype origin_datatype,
0797 int target_rank,
0798 MPI_Aint target_disp,
0799 int target_count,
0800 MPI_Datatype target_datatype,
0801 AMPI_Win win
0802 );
0803
0804 int FW_AMPI_Win_fence( int assert,
0805 AMPI_Win win );
0806
0807 int BW_AMPI_Win_fence( int assert,
0808 AMPI_Win win );
0809
0810
0811
0812 #if defined(__cplusplus)
0813 }
0814 #endif
0815
0816 #endif