10#include "Teuchos_CommHelpers.hpp"
11#ifdef HAVE_TEUCHOS_MPI
12# include "Teuchos_Details_MpiCommRequest.hpp"
15#ifdef HAVE_TEUCHOSCORE_CXX11
21#ifdef HAVE_TEUCHOS_MPI
24std::string getMpiErrorString (
const int errCode) {
27 char errString [MPI_MAX_ERROR_STRING+1];
28 int errStringLen = MPI_MAX_ERROR_STRING;
29 (void) MPI_Error_string (errCode, errString, &errStringLen);
34 if (errString[errStringLen-1] !=
'\0') {
35 errString[errStringLen] =
'\0';
37 return std::string (errString);
47alltoAllImpl (
const T sendBuf[],
51 const Comm<int>& comm)
53#ifdef HAVE_TEUCHOS_MPI
54 using Teuchos::Details::MpiTypeTraits;
59 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
60 if (mpiComm == NULL) {
62 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
63 if (serialComm == NULL) {
66 alltoAll (sendBuf, sendCount, recvBuf, recvCount, comm);
69 std::copy (sendBuf, sendBuf + sendCount, recvBuf);
72 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
74 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
76 int err = MPI_SUCCESS;
77 err = MPI_Alltoall(sendBuf, sendCount, rawMpiType,
78 recvBuf, recvCount, rawMpiType,
84 "MPI_Alltoall failed with the following error: "
85 << ::Teuchos::Details::getMpiErrorString (err));
89 std::copy (sendBuf, sendBuf + sendCount, recvBuf);
95alltoAllvImpl (
const T sendBuf[],
96 const int sendCounts[],
97 const int sendDispls[],
99 const int recvCounts[],
100 const int recvDispls[],
101 const Comm<int>& comm)
103#ifdef HAVE_TEUCHOS_MPI
104 using Teuchos::Details::MpiTypeTraits;
109 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
110 if (mpiComm == NULL) {
112 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
113 if (serialComm == NULL) {
116 alltoAllv (sendBuf, sendCounts, sendDispls, recvBuf, recvCounts, recvDispls, comm);
119 std::copy (sendBuf, sendBuf + sendCounts[0], recvBuf);
122 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
124 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
126 int err = MPI_SUCCESS;
127 err = MPI_Alltoallv(sendBuf, sendCounts, sendDispls, rawMpiType,
128 recvBuf, recvCounts, recvDispls, rawMpiType,
134 "MPI_Alltoallv failed with the following error: "
135 << ::Teuchos::Details::getMpiErrorString (err));
139 std::copy (sendBuf, sendBuf + sendCounts[0], recvBuf);
152reduceAllImpl (
const Comm<int>& comm,
153 const EReductionType reductType,
155 const T sendBuffer[],
158#ifdef HAVE_TEUCHOS_MPI
159 using Teuchos::Details::MpiTypeTraits;
164 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
165 if (mpiComm == NULL) {
167 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
168 if (serialComm == NULL) {
171#ifdef HAVE_TEUCHOSCORE_CXX11
172 std::unique_ptr<ValueTypeReductionOp<int, T> >
174 std::auto_ptr<ValueTypeReductionOp<int, T> >
176 reductOp (createOp<int, T> (reductType));
177 reduceAll (comm, *reductOp, count, sendBuffer, globalReducts);
180 std::copy (sendBuffer, sendBuffer + count, globalReducts);
183 MPI_Op rawMpiOp = ::Teuchos::Details::getMpiOpForEReductionType (reductType);
184 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
186 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
188 int err = MPI_SUCCESS;
189 if (sendBuffer == globalReducts) {
193 err = MPI_Allreduce (MPI_IN_PLACE, globalReducts,
194 count, rawMpiType, rawMpiOp, rawMpiComm);
197 err = MPI_Allreduce (
const_cast<T*
> (sendBuffer), globalReducts,
198 count, rawMpiType, rawMpiOp, rawMpiComm);
203 "MPI_Allreduce failed with the following error: "
204 << ::Teuchos::Details::getMpiErrorString (err));
208 std::copy (sendBuffer, sendBuffer + count, globalReducts);
222gatherImpl (
const T sendBuf[],
227 const Comm<int>& comm)
229#ifdef HAVE_TEUCHOS_MPI
230 using Teuchos::Details::MpiTypeTraits;
235 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
236 if (mpiComm == NULL) {
238 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
239 if (serialComm == NULL) {
242 gather<int, T> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
245 std::copy (sendBuf, sendBuf + sendCount, recvBuf);
248 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
250 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
251 const int err = MPI_Gather (
const_cast<T*
> (sendBuf), sendCount, rawMpiType,
252 recvBuf, recvCount, rawMpiType,
257 "MPI_Gather failed with the following error: "
258 << ::Teuchos::Details::getMpiErrorString (err));
262 std::copy (sendBuf, sendBuf + sendCount, recvBuf);
276scatterImpl (
const T sendBuf[],
281 const Comm<int>& comm)
283#ifdef HAVE_TEUCHOS_MPI
284 using Teuchos::Details::MpiTypeTraits;
289 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
290 if (mpiComm == NULL) {
292 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
293 if (serialComm == NULL) {
296 scatter<int, T> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
299 std::copy (sendBuf, sendBuf + sendCount, recvBuf);
302 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
304 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
306 MPI_Scatter (
const_cast<T*
> (sendBuf), sendCount, rawMpiType,
307 recvBuf, recvCount, rawMpiType,
310 (err != MPI_SUCCESS, std::runtime_error,
311 "MPI_Scatter failed with the following error: "
312 << ::Teuchos::Details::getMpiErrorString (err));
317 std::copy (sendBuf, sendBuf + sendCount, recvBuf);
323scattervImpl (
const T sendBuf[],
324 const int sendCounts[],
329 const Comm<int>& comm)
331#ifdef HAVE_TEUCHOS_MPI
332 using Teuchos::Details::MpiTypeTraits;
337 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
338 if (mpiComm == NULL) {
340 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
341 if (serialComm == NULL) {
344 scatterv<int, T> (sendBuf, sendCounts, displs, recvBuf, recvCount, root, comm);
347 std::copy (sendBuf, sendBuf + sendCounts[0], recvBuf);
350 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
352 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
354 MPI_Scatterv (
const_cast<T*
> (sendBuf), sendCounts, displs, rawMpiType,
355 recvBuf, recvCount, rawMpiType,
358 (err != MPI_SUCCESS, std::runtime_error,
359 "MPI_Scatter failed with the following error: "
360 << ::Teuchos::Details::getMpiErrorString (err));
365 std::copy (sendBuf, sendBuf + sendCounts[0], recvBuf);
379reduceImpl (
const T sendBuf[],
382 const EReductionType reductType,
384 const Comm<int>& comm)
386#ifdef HAVE_TEUCHOS_MPI
387 using Teuchos::Details::MpiTypeTraits;
392 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
393 if (mpiComm == NULL) {
395 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
396 if (serialComm == NULL) {
399 reduce<int, T> (sendBuf, recvBuf, count, reductType, root, comm);
402 std::copy (sendBuf, sendBuf + count, recvBuf);
405 MPI_Op rawMpiOp = ::Teuchos::Details::getMpiOpForEReductionType (reductType);
406 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
408 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
409 const int err = MPI_Reduce (
const_cast<T*
> (sendBuf), recvBuf, count,
410 rawMpiType, rawMpiOp, root, rawMpiComm);
412 (err != MPI_SUCCESS, std::runtime_error,
"MPI_Reduce failed with the "
413 "following error: " << ::Teuchos::Details::getMpiErrorString (err));
417 std::copy (sendBuf, sendBuf + count, recvBuf);
431gathervImpl (
const T sendBuf[],
434 const int recvCounts[],
437 const Comm<int>& comm)
439#ifdef HAVE_TEUCHOS_MPI
440 using Teuchos::Details::MpiTypeTraits;
445 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
446 if (mpiComm == NULL) {
448 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
449 if (serialComm == NULL) {
452 gatherv<int, T> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
456 recvCounts[0] > sendCount, std::invalid_argument,
457 "Teuchos::gatherv: If the input communicator contains only one "
458 "process, then you cannot receive more entries than you send. "
459 "You aim to receive " << recvCounts[0] <<
" entries, but to send "
460 << sendCount <<
" entries.");
464 std::copy (sendBuf, sendBuf + recvCounts[0], recvBuf + displs[0]);
467 MPI_Comm rawMpiComm = * (mpiComm->getRawMpiComm ());
469 MPI_Datatype rawMpiType = MpiTypeTraits<T>::getType (t);
470 const int err = MPI_Gatherv (
const_cast<T*
> (sendBuf),
474 const_cast<int*
> (recvCounts),
475 const_cast<int*
> (displs),
482 "MPI_Gatherv failed with the following error: "
483 << ::Teuchos::Details::getMpiErrorString (err));
488 recvCounts[0] > sendCount, std::invalid_argument,
489 "Teuchos::gatherv: If the input communicator contains only one "
490 "process, then you cannot receive more entries than you send. "
491 "You aim to receive " << recvCounts[0] <<
" entries, but to send "
492 << sendCount <<
" entries.");
496 std::copy (sendBuf, sendBuf + recvCounts[0], recvBuf + displs[0]);
505template<
typename Packet>
506RCP<Teuchos::CommRequest<int> >
507ireceiveGeneral(
const Comm<int>& comm,
508 const ArrayRCP<Packet> &recvBuffer,
509 const int sourceRank)
511 TEUCHOS_COMM_TIME_MONITOR(
513 <<
"> ( value type )"
515 ValueTypeSerializationBuffer<int, Packet>
516 charRecvBuffer (recvBuffer.size (), recvBuffer.getRawPtr ());
517 RCP<CommRequest<int> > commRequest =
518 comm.ireceive (charRecvBuffer.getCharBufferView (), sourceRank);
519 set_extra_data (recvBuffer,
"buffer", inOutArg (commRequest));
525template<
typename Packet>
526RCP<Teuchos::CommRequest<int> >
527ireceiveGeneral (
const ArrayRCP<Packet> &recvBuffer,
528 const int sourceRank,
530 const Comm<int>& comm)
532 TEUCHOS_COMM_TIME_MONITOR(
534 <<
"> ( value type )"
536 ValueTypeSerializationBuffer<int, Packet>
537 charRecvBuffer (recvBuffer.size (), recvBuffer.getRawPtr ());
538 RCP<CommRequest<int> > commRequest =
539 comm.ireceive (charRecvBuffer.getCharBufferView (), sourceRank, tag);
540 set_extra_data (recvBuffer,
"buffer", inOutArg (commRequest));
557RCP<CommRequest<int> >
558ireceiveImpl (
const Comm<int>& comm,
559 const ArrayRCP<T>& recvBuffer,
560 const int sourceRank)
562#ifdef HAVE_TEUCHOS_MPI
563 using Teuchos::Details::MpiTypeTraits;
568 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
569 if (mpiComm == NULL) {
571 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
572 if (serialComm == NULL) {
575 return ireceiveGeneral<T> (comm, recvBuffer, sourceRank);
581 "ireceiveImpl: Not implemented for a serial communicator.");
585 MPI_Comm rawComm = * (mpiComm->getRawMpiComm ());
587 MPI_Datatype rawType = MpiTypeTraits<T>::getType (t);
588 T* rawRecvBuf = recvBuffer.getRawPtr ();
589 const int count = as<int> (recvBuffer.size ());
590 const int tag = mpiComm->getTag ();
591 MPI_Request rawRequest = MPI_REQUEST_NULL;
592 const int err = MPI_Irecv (rawRecvBuf, count, rawType, sourceRank, tag,
593 rawComm, &rawRequest);
595 err != MPI_SUCCESS, std::runtime_error,
596 "MPI_Irecv failed with the following error: "
597 << ::Teuchos::Details::getMpiErrorString (err));
599 ArrayRCP<const char> buf =
600 arcp_const_cast<const char> (arcp_reinterpret_cast<char> (recvBuffer));
601 RCP<Details::MpiCommRequest> req (
new Details::MpiCommRequest (rawRequest, buf));
602 return rcp_implicit_cast<CommRequest<int> > (req);
608 "ireceiveImpl: Not implemented for a serial communicator.");
625RCP<CommRequest<int> >
626ireceiveImpl (
const ArrayRCP<T>& recvBuffer,
627 const int sourceRank,
629 const Comm<int>& comm)
631#ifdef HAVE_TEUCHOS_MPI
632 using Teuchos::Details::MpiTypeTraits;
637 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
638 if (mpiComm == NULL) {
640 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
641 if (serialComm == NULL) {
644 return ireceiveGeneral<T> (recvBuffer, sourceRank, tag, comm);
650 "ireceiveImpl: Not implemented for a serial communicator.");
654 MPI_Comm rawComm = * (mpiComm->getRawMpiComm ());
656 MPI_Datatype rawType = MpiTypeTraits<T>::getType (t);
657 T* rawRecvBuf = recvBuffer.getRawPtr ();
658 const int count = as<int> (recvBuffer.size ());
659 MPI_Request rawRequest = MPI_REQUEST_NULL;
660 const int err = MPI_Irecv (rawRecvBuf, count, rawType, sourceRank, tag,
661 rawComm, &rawRequest);
663 err != MPI_SUCCESS, std::runtime_error,
664 "MPI_Irecv failed with the following error: "
665 << ::Teuchos::Details::getMpiErrorString (err));
667 ArrayRCP<const char> buf =
668 arcp_const_cast<const char> (arcp_reinterpret_cast<char> (recvBuffer));
669 RCP<Details::MpiCommRequest> req (
new Details::MpiCommRequest (rawRequest, buf));
670 return rcp_implicit_cast<CommRequest<int> > (req);
676 "ireceiveImpl: Not implemented for a serial communicator.");
689sendGeneral (
const Comm<int>& comm,
691 const T sendBuffer[],
694 TEUCHOS_COMM_TIME_MONITOR(
696 ConstValueTypeSerializationBuffer<int,T> charSendBuffer (count, sendBuffer);
697 comm.send (charSendBuffer.getBytes (),
698 charSendBuffer.getCharBuffer (),
706sendGeneral (
const T sendBuffer[],
710 const Comm<int>& comm)
712 TEUCHOS_COMM_TIME_MONITOR(
714 ConstValueTypeSerializationBuffer<int,T> charSendBuffer (count, sendBuffer);
715 comm.send (charSendBuffer.getBytes (),
716 charSendBuffer.getCharBuffer (),
734sendImpl (
const Comm<int>& comm,
736 const T sendBuffer[],
739#ifdef HAVE_TEUCHOS_MPI
740 using Teuchos::Details::MpiTypeTraits;
745 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
746 if (mpiComm == NULL) {
748 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
749 if (serialComm == NULL) {
752 sendGeneral<T> (comm, count, sendBuffer, destRank);
758 "sendImpl: Not implemented for a serial communicator.");
762 TEUCHOS_COMM_TIME_MONITOR(
764 MPI_Comm rawComm = * (mpiComm->getRawMpiComm ());
766 MPI_Datatype rawType = MpiTypeTraits<T>::getType (t);
767 T* rawBuf =
const_cast<T*
> (sendBuffer);
768 const int tag = mpiComm->getTag ();
769 const int err = MPI_Send (rawBuf, count, rawType, destRank, tag, rawComm);
773 "MPI_Send failed with the following error: "
774 << ::Teuchos::Details::getMpiErrorString (err));
780 "sendImpl: Not implemented for a serial communicator.");
788sendImpl (
const T sendBuffer[],
792 const Comm<int>& comm)
794#ifdef HAVE_TEUCHOS_MPI
795 using Teuchos::Details::MpiTypeTraits;
800 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
801 if (mpiComm == NULL) {
803 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
804 if (serialComm == NULL) {
807 sendGeneral<T> (sendBuffer, count, destRank, tag, comm);
813 "sendImpl: Not implemented for a serial communicator.");
817 TEUCHOS_COMM_TIME_MONITOR(
819 MPI_Comm rawComm = * (mpiComm->getRawMpiComm ());
821 MPI_Datatype rawType = MpiTypeTraits<T>::getType (t);
822 T* rawBuf =
const_cast<T*
> (sendBuffer);
823 const int err = MPI_Send (rawBuf, count, rawType, destRank, tag, rawComm);
827 "MPI_Send failed with the following error: "
828 << ::Teuchos::Details::getMpiErrorString (err));
834 "sendImpl: Not implemented for a serial communicator.");
844RCP<CommRequest<int> >
845isendGeneral (
const Comm<int>& comm,
846 const ArrayRCP<const T>& sendBuffer,
849 TEUCHOS_COMM_TIME_MONITOR(
851 ConstValueTypeSerializationBuffer<int, T>
852 charSendBuffer (sendBuffer.size (), sendBuffer.getRawPtr ());
853 RCP<CommRequest<int> > commRequest =
854 comm.isend (charSendBuffer.getCharBufferView (), destRank);
855 set_extra_data (sendBuffer,
"buffer", inOutArg (commRequest));
866RCP<CommRequest<int> >
867isendGeneral (
const ArrayRCP<const T>& sendBuffer,
870 const Comm<int>& comm)
872 TEUCHOS_COMM_TIME_MONITOR(
874 ConstValueTypeSerializationBuffer<int, T>
875 charSendBuffer (sendBuffer.size (), sendBuffer.getRawPtr ());
876 RCP<CommRequest<int> > commRequest =
877 comm.isend (charSendBuffer.getCharBufferView (), destRank, tag);
878 set_extra_data (sendBuffer,
"buffer", inOutArg (commRequest));
885RCP<Teuchos::CommRequest<int> >
886isendImpl (
const ArrayRCP<const T>& sendBuffer,
889 const Comm<int>& comm)
891#ifdef HAVE_TEUCHOS_MPI
892 using Teuchos::Details::MpiTypeTraits;
897 const MpiComm<int>* mpiComm =
dynamic_cast<const MpiComm<int>*
> (&comm);
898 if (mpiComm == NULL) {
900 const SerialComm<int>* serialComm =
dynamic_cast<const SerialComm<int>*
> (&comm);
901 if (serialComm == NULL) {
904 return isendGeneral<T> (sendBuffer, destRank, tag, comm);
908 true, std::logic_error,
909 "isendImpl: Not implemented for a serial communicator.");
913 TEUCHOS_COMM_TIME_MONITOR(
916 MPI_Comm rawComm = * (mpiComm->getRawMpiComm ());
918 MPI_Datatype rawType = MpiTypeTraits<T>::getType (t);
922 T* rawSendBuf =
const_cast<T*
> (sendBuffer.getRawPtr ());
923 const int count = as<int> (sendBuffer.size ());
924 MPI_Request rawRequest = MPI_REQUEST_NULL;
925 const int err = MPI_Isend (rawSendBuf, count, rawType, destRank, tag,
926 rawComm, &rawRequest);
930 "MPI_Isend failed with the following error: "
931 << ::Teuchos::Details::getMpiErrorString (err));
933 ArrayRCP<const char> buf = arcp_reinterpret_cast<const char> (sendBuffer);
934 RCP<Details::MpiCommRequest> req (
new Details::MpiCommRequest (rawRequest, buf));
935 return rcp_implicit_cast<CommRequest<int> > (req);
941 "isendImpl: Not implemented for a serial communicator.");
958#ifdef HAVE_TEUCHOS_COMPLEX
962reduceAll<int, std::complex<double> > (
const Comm<int>& comm,
963 const EReductionType reductType,
965 const std::complex<double> sendBuffer[],
966 std::complex<double> globalReducts[])
968 TEUCHOS_COMM_TIME_MONITOR(
969 "Teuchos::reduceAll<int, std::complex<double> > (" << count <<
", "
970 << toString (reductType) <<
")"
972 reduceAllImpl<std::complex<double> > (comm, reductType, count, sendBuffer, globalReducts);
976RCP<Teuchos::CommRequest<int> >
977ireceive<int, std::complex<double> > (
const Comm<int>& comm,
978 const ArrayRCP<std::complex<double> >& recvBuffer,
979 const int sourceRank)
981 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, std::complex<double> >");
982 return ireceiveImpl<std::complex<double> > (comm, recvBuffer, sourceRank);
986RCP<Teuchos::CommRequest<int> >
987ireceive<int, std::complex<double> > (
const ArrayRCP<std::complex<double> >& recvBuffer,
988 const int sourceRank,
990 const Comm<int>& comm)
992 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, std::complex<double> >");
993 return ireceiveImpl<std::complex<double> > (recvBuffer, sourceRank, tag, comm);
998send<int, std::complex<double> > (
const Comm<int>& comm,
1000 const std::complex<double> sendBuffer[],
1003 sendImpl<std::complex<double> > (comm, count, sendBuffer, destRank);
1008send<int, std::complex<double> > (
const std::complex<double> sendBuffer[],
1012 const Comm<int>& comm)
1014 sendImpl<std::complex<double> > (sendBuffer, count, destRank, tag, comm);
1018RCP<Teuchos::CommRequest<int> >
1019isend (
const ArrayRCP<
const std::complex<double> >& sendBuffer,
1022 const Comm<int>& comm)
1024 return isendImpl<std::complex<double> > (sendBuffer, destRank, tag, comm);
1030reduceAll<int, std::complex<float> > (
const Comm<int>& comm,
1031 const EReductionType reductType,
1033 const std::complex<float> sendBuffer[],
1034 std::complex<float> globalReducts[])
1036 TEUCHOS_COMM_TIME_MONITOR(
1037 "Teuchos::reduceAll<int, std::complex<float> > (" << count <<
", "
1038 << toString (reductType) <<
")"
1040 reduceAllImpl<std::complex<float> > (comm, reductType, count, sendBuffer, globalReducts);
1044RCP<Teuchos::CommRequest<int> >
1045ireceive<int, std::complex<float> > (
const Comm<int>& comm,
1046 const ArrayRCP<std::complex<float> >& recvBuffer,
1047 const int sourceRank)
1049 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, std::complex<float> >");
1050 return ireceiveImpl<std::complex<float> > (comm, recvBuffer, sourceRank);
1054RCP<Teuchos::CommRequest<int> >
1055ireceive<int, std::complex<float> > (
const ArrayRCP<std::complex<float> >& recvBuffer,
1056 const int sourceRank,
1058 const Comm<int>& comm)
1060 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, std::complex<float> >");
1061 return ireceiveImpl<std::complex<float> > (recvBuffer, sourceRank, tag, comm);
1066send<int, std::complex<float> > (
const Comm<int>& comm,
1068 const std::complex<float> sendBuffer[],
1071 return sendImpl<std::complex<float> > (comm, count, sendBuffer, destRank);
1076send<int, std::complex<float> > (
const std::complex<float> sendBuffer[],
1080 const Comm<int>& comm)
1082 return sendImpl<std::complex<float> > (sendBuffer, count, destRank, tag, comm);
1086RCP<Teuchos::CommRequest<int> >
1087isend (
const ArrayRCP<
const std::complex<float> >& sendBuffer,
1090 const Comm<int>& comm)
1092 return isendImpl<std::complex<float> > (sendBuffer, destRank, tag, comm);
1100alltoAllv<int, double> (
const double sendBuf[],
1101 const int sendCounts[],
1102 const int sendDispls[],
1104 const int recvCounts[],
1105 const int recvDispls[],
1106 const Comm<int>& comm)
1108 alltoAllvImpl<double> (sendBuf, sendCounts, sendDispls,
1109 recvBuf, recvCounts, recvDispls, comm);
1114reduceAll<int, double> (
const Comm<int>& comm,
1115 const EReductionType reductType,
1117 const double sendBuffer[],
1118 double globalReducts[])
1120 TEUCHOS_COMM_TIME_MONITOR(
1121 "Teuchos::reduceAll<int, double> (" << count <<
", "
1122 << toString (reductType) <<
")"
1124 reduceAllImpl<double> (comm, reductType, count, sendBuffer, globalReducts);
1128RCP<Teuchos::CommRequest<int> >
1129ireceive<int, double> (
const Comm<int>& comm,
1130 const ArrayRCP<double>& recvBuffer,
1131 const int sourceRank)
1133 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, double>");
1134 return ireceiveImpl<double> (comm, recvBuffer, sourceRank);
1138RCP<Teuchos::CommRequest<int> >
1139ireceive<int, double> (
const ArrayRCP<double>& recvBuffer,
1140 const int sourceRank,
1142 const Comm<int>& comm)
1144 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, double>");
1145 return ireceiveImpl<double> (recvBuffer, sourceRank, tag, comm);
1150send<int, double> (
const Comm<int>& comm,
1152 const double sendBuffer[],
1155 return sendImpl<double> (comm, count, sendBuffer, destRank);
1160send<int, double> (
const double sendBuffer[],
1164 const Comm<int>& comm)
1166 return sendImpl<double> (sendBuffer, count, destRank, tag, comm);
1170RCP<Teuchos::CommRequest<int> >
1171isend (
const ArrayRCP<const double>& sendBuffer,
1174 const Comm<int>& comm)
1176 return isendImpl<double> (sendBuffer, destRank, tag, comm);
1181gatherv<int, double> (
const double sendBuf[],
1182 const int sendCount,
1184 const int recvCounts[],
1187 const Comm<int>& comm)
1189 gathervImpl<double> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1196reduceAll<int, float> (
const Comm<int>& comm,
1197 const EReductionType reductType,
1199 const float sendBuffer[],
1200 float globalReducts[])
1202 TEUCHOS_COMM_TIME_MONITOR(
1203 "Teuchos::reduceAll<int, float> (" << count <<
", "
1204 << toString (reductType) <<
")"
1206 reduceAllImpl<float> (comm, reductType, count, sendBuffer, globalReducts);
1210RCP<Teuchos::CommRequest<int> >
1211ireceive<int, float> (
const Comm<int>& comm,
1212 const ArrayRCP<float>& recvBuffer,
1213 const int sourceRank)
1215 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, float>");
1216 return ireceiveImpl<float> (comm, recvBuffer, sourceRank);
1220RCP<Teuchos::CommRequest<int> >
1221ireceive<int, float> (
const ArrayRCP<float>& recvBuffer,
1222 const int sourceRank,
1224 const Comm<int>& comm)
1226 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, float>");
1227 return ireceiveImpl<float> (recvBuffer, sourceRank, tag, comm);
1232send<int, float> (
const Comm<int>& comm,
1234 const float sendBuffer[],
1237 return sendImpl<float> (comm, count, sendBuffer, destRank);
1242send<int, float> (
const float sendBuffer[],
1246 const Comm<int>& comm)
1248 return sendImpl<float> (sendBuffer, count, destRank, tag, comm);
1252RCP<Teuchos::CommRequest<int> >
1253isend (
const ArrayRCP<const float>& sendBuffer,
1256 const Comm<int>& comm)
1258 return isendImpl<float> (sendBuffer, destRank, tag, comm);
1263gatherv<int,float> (
const float sendBuf[],
1264 const int sendCount,
1266 const int recvCounts[],
1269 const Comm<int>& comm)
1271 gathervImpl<float> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1278gather<int, long long> (
const long long sendBuf[],
1279 const int sendCount,
1280 long long recvBuf[],
1281 const int recvCount,
1283 const Comm<int>& comm)
1285 gatherImpl<long long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1290gatherv<int, long long> (
const long long sendBuf[],
1291 const int sendCount,
1292 long long recvBuf[],
1293 const int recvCounts[],
1296 const Comm<int>& comm)
1298 gathervImpl<long long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1303reduceAll<int, long long> (
const Comm<int>& comm,
1304 const EReductionType reductType,
1306 const long long sendBuffer[],
1307 long long globalReducts[])
1309 TEUCHOS_COMM_TIME_MONITOR(
1310 "Teuchos::reduceAll<int, long long> (" << count <<
", "
1311 << toString (reductType) <<
")"
1313 reduceAllImpl<long long> (comm, reductType, count, sendBuffer, globalReducts);
1317RCP<Teuchos::CommRequest<int> >
1318ireceive<int, long long> (
const Comm<int>& comm,
1319 const ArrayRCP<long long>& recvBuffer,
1320 const int sourceRank)
1322 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, long long>");
1323 return ireceiveImpl<long long> (comm, recvBuffer, sourceRank);
1327RCP<Teuchos::CommRequest<int> >
1328ireceive<int, long long> (
const ArrayRCP<long long>& recvBuffer,
1329 const int sourceRank,
1331 const Comm<int>& comm)
1333 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, long long>");
1334 return ireceiveImpl<long long> (recvBuffer, sourceRank, tag, comm);
1339send<int, long long> (
const Comm<int>& comm,
1341 const long long sendBuffer[],
1344 return sendImpl<long long> (comm, count, sendBuffer, destRank);
1349send<int, long long> (
const long long sendBuffer[],
1353 const Comm<int>& comm)
1355 return sendImpl<long long> (sendBuffer, count, destRank, tag, comm);
1359RCP<Teuchos::CommRequest<int> >
1360isend (
const ArrayRCP<const long long>& sendBuffer,
1363 const Comm<int>& comm)
1365 return isendImpl<long long> (sendBuffer, destRank, tag, comm);
1371gather<int, unsigned long long> (
const unsigned long long sendBuf[],
1372 const int sendCount,
1373 unsigned long long recvBuf[],
1374 const int recvCount,
1376 const Comm<int>& comm)
1378 gatherImpl<unsigned long long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1383gatherv<int, unsigned long long> (
const unsigned long long sendBuf[],
1384 const int sendCount,
1385 unsigned long long recvBuf[],
1386 const int recvCounts[],
1389 const Comm<int>& comm)
1391 gathervImpl<unsigned long long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1396reduceAll<int, unsigned long long> (
const Comm<int>& comm,
1397 const EReductionType reductType,
1399 const unsigned long long sendBuffer[],
1400 unsigned long long globalReducts[])
1402 TEUCHOS_COMM_TIME_MONITOR(
1403 "Teuchos::reduceAll<int, unsigned long long> (" << count <<
", "
1404 << toString (reductType) <<
")"
1406 reduceAllImpl<unsigned long long> (comm, reductType, count, sendBuffer, globalReducts);
1410RCP<Teuchos::CommRequest<int> >
1411ireceive<int, unsigned long long> (
const Comm<int>& comm,
1412 const ArrayRCP<unsigned long long>& recvBuffer,
1413 const int sourceRank)
1415 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, unsigned long long>");
1416 return ireceiveImpl<unsigned long long> (comm, recvBuffer, sourceRank);
1420RCP<Teuchos::CommRequest<int> >
1421ireceive<int, unsigned long long> (
const ArrayRCP<unsigned long long>& recvBuffer,
1422 const int sourceRank,
1424 const Comm<int>& comm)
1426 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, unsigned long long>");
1427 return ireceiveImpl<unsigned long long> (recvBuffer, sourceRank, tag, comm);
1432send<int, unsigned long long> (
const Comm<int>& comm,
1434 const unsigned long long sendBuffer[],
1437 return sendImpl<unsigned long long> (comm, count, sendBuffer, destRank);
1442send<int, unsigned long long> (
const unsigned long long sendBuffer[],
1446 const Comm<int>& comm)
1448 return sendImpl<unsigned long long> (sendBuffer, count, destRank, tag, comm);
1452RCP<Teuchos::CommRequest<int> >
1453isend (
const ArrayRCP<const unsigned long long>& sendBuffer,
1456 const Comm<int>& comm)
1458 return isendImpl<unsigned long long> (sendBuffer, destRank, tag, comm);
1465gather<int, long> (
const long sendBuf[],
1466 const int sendCount,
1468 const int recvCount,
1470 const Comm<int>& comm)
1472 gatherImpl<long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1477gatherv<int, long> (
const long sendBuf[],
1478 const int sendCount,
1480 const int recvCounts[],
1483 const Comm<int>& comm)
1485 gathervImpl<long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1490reduceAll<int, long> (
const Comm<int>& comm,
1491 const EReductionType reductType,
1493 const long sendBuffer[],
1494 long globalReducts[])
1496 TEUCHOS_COMM_TIME_MONITOR(
1497 "Teuchos::reduceAll<int, long> (" << count <<
", "
1498 << toString (reductType) <<
")"
1500 reduceAllImpl<long> (comm, reductType, count, sendBuffer, globalReducts);
1504RCP<Teuchos::CommRequest<int> >
1505ireceive<int, long> (
const Comm<int>& comm,
1506 const ArrayRCP<long>& recvBuffer,
1507 const int sourceRank)
1509 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, long>");
1510 return ireceiveImpl<long> (comm, recvBuffer, sourceRank);
1514RCP<Teuchos::CommRequest<int> >
1515ireceive<int, long> (
const ArrayRCP<long>& recvBuffer,
1516 const int sourceRank,
1518 const Comm<int>& comm)
1520 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, long>");
1521 return ireceiveImpl<long> (recvBuffer, sourceRank, tag, comm);
1526send<int, long> (
const Comm<int>& comm,
1528 const long sendBuffer[],
1531 return sendImpl<long> (comm, count, sendBuffer, destRank);
1536send<int, long> (
const long sendBuffer[],
1540 const Comm<int>& comm)
1542 return sendImpl<long> (sendBuffer, count, destRank, tag, comm);
1546RCP<Teuchos::CommRequest<int> >
1547isend (
const ArrayRCP<const long>& sendBuffer,
1550 const Comm<int>& comm)
1552 return isendImpl<long> (sendBuffer, destRank, tag, comm);
1559gather<int, unsigned long> (
const unsigned long sendBuf[],
1560 const int sendCount,
1561 unsigned long recvBuf[],
1562 const int recvCount,
1564 const Comm<int>& comm)
1566 gatherImpl<unsigned long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1571gatherv<int, unsigned long> (
const unsigned long sendBuf[],
1572 const int sendCount,
1573 unsigned long recvBuf[],
1574 const int recvCounts[],
1577 const Comm<int>& comm)
1579 gathervImpl<unsigned long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1584reduceAll<int, unsigned long> (
const Comm<int>& comm,
1585 const EReductionType reductType,
1587 const unsigned long sendBuffer[],
1588 unsigned long globalReducts[])
1590 TEUCHOS_COMM_TIME_MONITOR(
1591 "Teuchos::reduceAll<int, unsigned long> (" << count <<
", "
1592 << toString (reductType) <<
")"
1594 reduceAllImpl<unsigned long> (comm, reductType, count, sendBuffer, globalReducts);
1598RCP<Teuchos::CommRequest<int> >
1599ireceive<int, unsigned long> (
const Comm<int>& comm,
1600 const ArrayRCP<unsigned long>& recvBuffer,
1601 const int sourceRank)
1603 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, unsigned long>");
1604 return ireceiveImpl<unsigned long> (comm, recvBuffer, sourceRank);
1608RCP<Teuchos::CommRequest<int> >
1609ireceive<int, unsigned long> (
const ArrayRCP<unsigned long>& recvBuffer,
1610 const int sourceRank,
1612 const Comm<int>& comm)
1614 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, unsigned long>");
1615 return ireceiveImpl<unsigned long> (recvBuffer, sourceRank, tag, comm);
1620send<int, unsigned long> (
const Comm<int>& comm,
1622 const unsigned long sendBuffer[],
1625 return sendImpl<unsigned long> (comm, count, sendBuffer, destRank);
1630send<int, unsigned long> (
const unsigned long sendBuffer[],
1634 const Comm<int>& comm)
1636 return sendImpl<unsigned long> (sendBuffer, count, destRank, tag, comm);
1640RCP<Teuchos::CommRequest<int> >
1641isend (
const ArrayRCP<const unsigned long>& sendBuffer,
1644 const Comm<int>& comm)
1646 return isendImpl<unsigned long> (sendBuffer, destRank, tag, comm);
1652alltoAll<int, int> (
const int sendBuf[],
1653 const int sendCount,
1655 const int recvCount,
1656 const Comm<int>& comm)
1658 alltoAllImpl<int> (sendBuf, sendCount, recvBuf, recvCount, comm);
1663alltoAllv<int, int> (
const int sendBuf[],
1664 const int sendCounts[],
1665 const int sendDispls[],
1667 const int recvCounts[],
1668 const int recvDispls[],
1669 const Comm<int>& comm)
1671 alltoAllvImpl<int> (sendBuf, sendCounts, sendDispls,
1672 recvBuf, recvCounts, recvDispls, comm);
1677gather<int, int> (
const int sendBuf[],
1678 const int sendCount,
1680 const int recvCount,
1682 const Comm<int>& comm)
1684 gatherImpl<int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1689gatherv<int, int> (
const int sendBuf[],
1690 const int sendCount,
1692 const int recvCounts[],
1695 const Comm<int>& comm)
1697 gathervImpl<int> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1702scatter<int, int> (
const int sendBuf[],
1703 const int sendCount,
1705 const int recvCount,
1707 const Comm<int>& comm)
1709 scatterImpl<int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1714scatterv<int, int> (
const int sendBuf[],
1715 const int sendCount[],
1718 const int recvCount,
1720 const Comm<int>& comm)
1722 scattervImpl<int> (sendBuf, sendCount, displs, recvBuf, recvCount, root, comm);
1727scatterv<int, double> (
const double sendBuf[],
1728 const int sendCount[],
1731 const int recvCount,
1733 const Comm<int>& comm)
1735 scattervImpl<double> (sendBuf, sendCount, displs, recvBuf, recvCount, root, comm);
1740scatterv<int, float> (
const float sendBuf[],
1741 const int sendCounts[],
1744 const int recvCount,
1746 const Comm<int>& comm)
1748 scattervImpl<float> (sendBuf, sendCounts, displs, recvBuf, recvCount, root, comm);
1753reduce<int, int> (
const int sendBuf[],
1756 const EReductionType reductType,
1758 const Comm<int>& comm)
1760 TEUCHOS_COMM_TIME_MONITOR
1761 (
"Teuchos::reduce<int, int> (" << count <<
", " << toString (reductType)
1763 reduceImpl<int> (sendBuf, recvBuf, count, reductType, root, comm);
1767reduce<int, long> (
const long sendBuf[],
1770 const EReductionType reductType,
1772 const Comm<int>& comm)
1774 TEUCHOS_COMM_TIME_MONITOR
1775 (
"Teuchos::reduce<int, int> (" << count <<
", " << toString (reductType)
1777 reduceImpl<long> (sendBuf, recvBuf, count, reductType, root, comm);
1782reduce<int, unsigned long> (
const unsigned long sendBuf[],
1783 unsigned long recvBuf[],
1785 const EReductionType reductType,
1787 const Comm<int>& comm)
1789 TEUCHOS_COMM_TIME_MONITOR
1790 (
"Teuchos::reduce<int, int> (" << count <<
", " << toString (reductType)
1792 reduceImpl<unsigned long> (sendBuf, recvBuf, count, reductType, root, comm);
1797reduce<int, unsigned long long > (
const unsigned long long sendBuf[],
1798 unsigned long long recvBuf[],
1800 const EReductionType reductType,
1802 const Comm<int>& comm)
1804 TEUCHOS_COMM_TIME_MONITOR
1805 (
"Teuchos::reduce<int, int> (" << count <<
", " << toString (reductType)
1807 reduceImpl<unsigned long long> (sendBuf, recvBuf, count, reductType, root, comm);
1812reduce<int, double> (
const double sendBuf[],
1815 const EReductionType reductType,
1817 const Comm<int>& comm)
1819 TEUCHOS_COMM_TIME_MONITOR
1820 (
"Teuchos::reduce<int, int> (" << count <<
", " << toString (reductType)
1822 reduceImpl<double> (sendBuf, recvBuf, count, reductType, root, comm);
1826reduceAll<int, int> (
const Comm<int>& comm,
1827 const EReductionType reductType,
1829 const int sendBuffer[],
1830 int globalReducts[])
1832 TEUCHOS_COMM_TIME_MONITOR(
1833 "Teuchos::reduceAll<int, int> (" << count <<
", "
1834 << toString (reductType) <<
")"
1836 reduceAllImpl<int> (comm, reductType, count, sendBuffer, globalReducts);
1840RCP<Teuchos::CommRequest<int> >
1841ireceive<int, int> (
const Comm<int>& comm,
1842 const ArrayRCP<int>& recvBuffer,
1843 const int sourceRank)
1845 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, int>");
1846 return ireceiveImpl<int> (comm, recvBuffer, sourceRank);
1850RCP<Teuchos::CommRequest<int> >
1851ireceive<int, int> (
const ArrayRCP<int>& recvBuffer,
1852 const int sourceRank,
1854 const Comm<int>& comm)
1856 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, int>");
1857 return ireceiveImpl<int> (recvBuffer, sourceRank, tag, comm);
1862send<int, int> (
const Comm<int>& comm,
1864 const int sendBuffer[],
1867 return sendImpl<int> (comm, count, sendBuffer, destRank);
1872send<int, int> (
const int sendBuffer[],
1876 const Comm<int>& comm)
1878 return sendImpl<int> (sendBuffer, count, destRank, tag, comm);
1882RCP<Teuchos::CommRequest<int> >
1883isend (
const ArrayRCP<const int>& sendBuffer,
1886 const Comm<int>& comm)
1888 return isendImpl<int> (sendBuffer, destRank, tag, comm);
1894gather<int, unsigned int> (
const unsigned int sendBuf[],
1895 const int sendCount,
1896 unsigned int recvBuf[],
1897 const int recvCount,
1899 const Comm<int>& comm)
1901 gatherImpl<unsigned int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1906gatherv<int, unsigned int> (
const unsigned int sendBuf[],
1907 const int sendCount,
1908 unsigned int recvBuf[],
1909 const int recvCounts[],
1912 const Comm<int>& comm)
1914 gathervImpl<unsigned int> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1919reduceAll<int, unsigned int> (
const Comm<int>& comm,
1920 const EReductionType reductType,
1922 const unsigned int sendBuffer[],
1923 unsigned int globalReducts[])
1925 TEUCHOS_COMM_TIME_MONITOR(
1926 "Teuchos::reduceAll<int, unsigned int> (" << count <<
", "
1927 << toString (reductType) <<
")"
1929 reduceAllImpl<unsigned int> (comm, reductType, count, sendBuffer, globalReducts);
1933RCP<Teuchos::CommRequest<int> >
1934ireceive<int, unsigned int> (
const Comm<int>& comm,
1935 const ArrayRCP<unsigned int>& recvBuffer,
1936 const int sourceRank)
1938 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, unsigned int>");
1939 return ireceiveImpl<unsigned int> (comm, recvBuffer, sourceRank);
1943RCP<Teuchos::CommRequest<int> >
1944ireceive<int, unsigned int> (
const ArrayRCP<unsigned int>& recvBuffer,
1945 const int sourceRank,
1947 const Comm<int>& comm)
1949 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, unsigned int>");
1950 return ireceiveImpl<unsigned int> (recvBuffer, sourceRank, tag, comm);
1955send<int, unsigned int> (
const Comm<int>& comm,
1957 const unsigned int sendBuffer[],
1960 return sendImpl<unsigned int> (comm, count, sendBuffer, destRank);
1965send<int, unsigned int> (
const unsigned int sendBuffer[],
1969 const Comm<int>& comm)
1971 return sendImpl<unsigned int> (sendBuffer, count, destRank, tag, comm);
1975RCP<Teuchos::CommRequest<int> >
1976isend (
const ArrayRCP<const unsigned int>& sendBuffer,
1979 const Comm<int>& comm)
1981 return isendImpl<unsigned int> (sendBuffer, destRank, tag, comm);
1988gather<int, short> (
const short sendBuf[],
1989 const int sendCount,
1991 const int recvCount,
1993 const Comm<int>& comm)
1995 gatherImpl<short> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
2000gatherv<int, short> (
const short sendBuf[],
2001 const int sendCount,
2003 const int recvCounts[],
2006 const Comm<int>& comm)
2008 gathervImpl<short> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
2013reduceAll<int, short> (
const Comm<int>& comm,
2014 const EReductionType reductType,
2016 const short sendBuffer[],
2017 short globalReducts[])
2019 TEUCHOS_COMM_TIME_MONITOR(
2020 "Teuchos::reduceAll<int, short> (" << count <<
", "
2021 << toString (reductType) <<
")"
2023 reduceAllImpl<short> (comm, reductType, count, sendBuffer, globalReducts);
2027RCP<Teuchos::CommRequest<int> >
2028ireceive<int, short> (
const Comm<int>& comm,
2029 const ArrayRCP<short>& recvBuffer,
2030 const int sourceRank)
2032 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, short>");
2033 return ireceiveImpl<short> (comm, recvBuffer, sourceRank);
2037RCP<Teuchos::CommRequest<int> >
2038ireceive<int, short> (
const ArrayRCP<short>& recvBuffer,
2039 const int sourceRank,
2041 const Comm<int>& comm)
2043 TEUCHOS_COMM_TIME_MONITOR(
"ireceive<int, short>");
2044 return ireceiveImpl<short> (recvBuffer, sourceRank, tag, comm);
2049send<int, short> (
const Comm<int>& comm,
2051 const short sendBuffer[],
2054 return sendImpl<short> (comm, count, sendBuffer, destRank);
2059send<int, short> (
const short sendBuffer[],
2063 const Comm<int>& comm)
2065 return sendImpl<short> (sendBuffer, count, destRank, tag, comm);
2069RCP<Teuchos::CommRequest<int> >
2070isend (
const ArrayRCP<const short>& sendBuffer,
2073 const Comm<int>& comm)
2075 return isendImpl<short> (sendBuffer, destRank, tag, comm);
2090reduceAll<int, char> (
const Comm<int>& comm,
2091 const EReductionType reductType,
2093 const char sendBuffer[],
2094 char globalReducts[])
2096 TEUCHOS_COMM_TIME_MONITOR(
2097 "Teuchos::reduceAll<int, char> (" << count <<
", "
2098 << toString (reductType) <<
")"
2100 reduceAllImpl<char> (comm, reductType, count, sendBuffer, globalReducts);
Declaration of Teuchos::Details::MpiTypeTraits (only if building with MPI)
static std::string name()
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
Namespace of implementation details.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...