42 #ifndef TEUCHOS_COMM_HELPERS_HPP 43 #define TEUCHOS_COMM_HELPERS_HPP 45 #include "Teuchos_Comm.hpp" 46 #include "Teuchos_CommUtilities.hpp" 47 #include "Teuchos_SerializationTraitsHelpers.hpp" 48 #include "Teuchos_ReductionOpHelpers.hpp" 49 #include "Teuchos_SerializerHelpers.hpp" 54 #include "Teuchos_Workspace.hpp" 57 #ifdef HAVE_TEUCHOS_MPI 59 #endif // HAVE_TEUCHOS_MPI 60 #include "Teuchos_DefaultSerialComm.hpp" 69 #ifdef HAVE_TEUCHOS_MPI 78 std::string getMpiErrorString (
const int errCode);
81 #endif // HAVE_TEUCHOS_MPI 87 template<
typename Ordinal>
88 int rank(
const Comm<Ordinal>& comm);
94 template<
typename Ordinal>
95 int size(
const Comm<Ordinal>& comm);
101 template<
typename Ordinal>
102 void barrier(
const Comm<Ordinal>& comm);
108 template<
typename Ordinal,
typename Packet>
110 const Comm<Ordinal>& comm,
112 const Ordinal count, Packet buffer[]
119 template<
typename Ordinal,
typename Packet>
121 const Comm<Ordinal>& comm,
123 const ArrayView<Packet> &buffer
130 template<
typename Ordinal,
typename Packet>
132 const Comm<Ordinal>& comm,
133 const int rootRank, Packet *
object 140 template<
typename Ordinal,
typename Packet>
142 const Comm<Ordinal>& comm,
143 const int rootRank,
const Ptr<Packet> &
object 150 template<
typename Ordinal,
typename Packet>
152 const Comm<Ordinal>& comm,
const Serializer<Ordinal,Packet> &serializer,
153 const int rootRank,
const Ordinal count, Packet*
const buffer[]
160 template<
typename Ordinal,
typename Packet>
162 const Comm<Ordinal>& comm,
const Serializer<Ordinal,Packet> &serializer,
163 const int rootRank,
const ArrayView<
const Ptr<Packet> > &buffer
171 template<
typename Ordinal,
typename Packet,
typename Serializer>
173 const Comm<Ordinal>& comm,
174 const Serializer& serializer,
176 const Ordinal count, Packet buffer[]
183 template<
typename Ordinal,
typename Packet>
185 gather (
const Packet sendBuf[],
186 const Ordinal sendCount,
188 const Ordinal recvCount,
190 const Comm<Ordinal>& comm);
196 template<
typename Ordinal,
typename Packet>
198 gatherv (
const Packet sendBuf[],
199 const Ordinal sendCount,
201 const Ordinal recvCounts[],
202 const Ordinal displs[],
204 const Comm<Ordinal>& comm);
211 template<
typename Ordinal,
typename Packet>
213 const Comm<Ordinal>& comm,
214 const Ordinal sendCount,
const Packet sendBuffer[],
215 const Ordinal recvCount, Packet recvBuffer[]
223 template<
typename Ordinal,
typename Packet>
225 const Comm<Ordinal>& comm,
const Serializer<Ordinal,Packet> &serializer,
226 const Ordinal sendCount,
const Packet*
const sendBuffer[],
227 const Ordinal recvCount, Packet*
const recvBuffer[]
235 template<
typename Ordinal,
typename Packet,
typename Serializer>
237 const Comm<Ordinal>& comm,
238 const Serializer& serializer,
239 const Ordinal sendCount,
const Packet sendBuffer[],
240 const Ordinal recvCount, Packet recvBuffer[]
269 template<
typename Ordinal,
typename Packet>
272 const Ordinal sendCount,
274 const Ordinal recvCount,
282 (
true, std::logic_error,
"Teuchos::scatter<" <<
284 <<
">: Generic version is not yet implemented. This function currently " 285 "only has an implementtion for Ordinal = int and Packet = int. " 286 "See Bug 6375 and Bug 6336.");
316 template<
typename Ordinal,
typename Packet>
318 reduce (
const Packet sendBuf[],
347 template<
typename Ordinal,
typename Packet>
350 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
358 template<
typename Ordinal,
typename Packet>
361 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
369 template<
typename Ordinal,
typename Packet>
376 template<
typename Ordinal,
typename Packet>
379 const Packet &send, Packet *globalReduct
382 reduceAll<Ordinal,Packet>(comm, reductType,
send, ptr(globalReduct));
390 template<
typename Ordinal,
typename Packet>
394 const Ordinal count,
const Packet*
const sendBuffer[], Packet*
const globalReducts[]
402 template<
typename Ordinal,
typename Packet,
typename Serializer>
407 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
415 template<
typename Ordinal,
typename Packet,
typename Serializer>
419 const EReductionType reductType,
420 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
428 template<
typename Ordinal,
typename Packet>
431 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
439 template<
typename Ordinal,
typename Packet>
442 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
450 template<
typename Ordinal,
typename Packet>
457 template<
typename Ordinal,
typename Packet>
460 const Packet &send, Packet *scanReduct
463 scan(comm, reductType, send, ptr(scanReduct));
471 template<
typename Ordinal,
typename Packet>
475 const Ordinal count,
const Packet*
const sendBuffer[], Packet*
const scanReducts[]
483 template<
typename Ordinal,
typename Packet,
typename Serializer>
488 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
496 template<
typename Ordinal,
typename Packet,
typename Serializer>
500 const EReductionType reductType,
501 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
508 template<
typename Ordinal,
typename Packet>
511 const Ordinal count,
const Packet sendBuffer[],
const int destRank
515 template<
typename Ordinal,
typename Packet>
517 send (
const Packet sendBuffer[],
527 template<
typename Ordinal,
typename Packet>
530 const Ordinal count,
const Packet sendBuffer[],
const int destRank
534 template<
typename Ordinal,
typename Packet>
536 ssend (
const Packet sendBuffer[],
546 template<
typename Ordinal,
typename Packet>
549 const Packet &send,
const int destRank
556 template<
typename Ordinal,
typename Packet>
559 const Packet &send,
const int destRank
568 template<
typename Ordinal,
typename Packet>
571 const Ordinal count,
const Packet*
const sendBuffer[],
const int destRank
579 template<
typename Ordinal,
typename Packet,
typename Serializer>
583 const Ordinal count,
const Packet sendBuffer[],
const int destRank
590 template<
typename Ordinal,
typename Packet>
593 const int sourceRank,
const Ordinal count, Packet recvBuffer[]
600 template<
typename Ordinal,
typename Packet>
603 const int sourceRank, Packet *recv
610 template<
typename Ordinal,
typename Packet>
613 const int sourceRank,
const Ordinal count, Packet*
const recvBuffer[]
621 template<
typename Ordinal,
typename Packet,
typename Serializer>
625 const int sourceRank,
const Ordinal count, Packet recvBuffer[]
633 template<
typename Ordinal,
typename Packet>
641 template<
typename Ordinal,
typename Packet>
653 template<
typename Ordinal,
typename Packet>
665 template<
typename Ordinal,
typename Packet,
typename Serializer>
677 template<
typename Ordinal,
typename Packet>
685 template<
typename Ordinal,
typename Packet>
696 template<
typename Ordinal,
typename Packet>
708 template<
typename Ordinal,
typename Packet,
typename Serializer>
729 template<
typename Ordinal,
typename Packet>
737 template<
typename Ordinal,
typename Packet>
740 const int sourceRank,
755 template<
typename Ordinal,
typename Packet>
767 template<
typename Ordinal,
typename Packet,
typename Serializer>
786 template<
typename Ordinal>
821 template<
typename Ordinal>
850 template<
typename Ordinal>
863 template<
typename Ordinal,
typename Packet>
870 const Packet inBuffer[],
884 template<
typename Ordinal,
typename Packet>
891 const Packet inBuffer[],
905 template<
typename Ordinal,
typename Packet>
912 const Packet inBuffer[],
922 template<
typename Ordinal,
typename Packet>
929 const Packet inBuffer[],
944 namespace MixMaxUtilities {
947 template<
bool isComparable,
typename Ordinal,
typename Packet>
951 template<
typename Ordinal,
typename Packet>
952 class Min<true,Ordinal,Packet> {
956 const Packet inBuffer[],
960 for(
int i = 0; i < count; ++i )
961 inoutBuffer[i] = TEUCHOS_MIN(inoutBuffer[i],inBuffer[i]);
966 template<
typename Ordinal,
typename Packet>
967 class Min<false,Ordinal,Packet> {
976 true,std::logic_error,
978 <<
" does not support comparison operations!" 984 template<
bool isComparable,
typename Ordinal,
typename Packet>
988 template<
typename Ordinal,
typename Packet>
989 class Max<true,Ordinal,Packet> {
993 const Packet inBuffer[],
997 for(
int i = 0; i < count; ++i )
998 inoutBuffer[i] = TEUCHOS_MAX(inoutBuffer[i],inBuffer[i]);
1003 template<
typename Ordinal,
typename Packet>
1004 class Max<false,Ordinal,Packet> {
1013 true,std::logic_error,
1015 <<
" does not support comparison operations!" 1021 template<
bool isComparable,
typename Ordinal,
typename Packet>
1025 template<
typename Ordinal,
typename Packet>
1026 class AND<true,Ordinal,Packet> {
1029 const Ordinal count,
1030 const Packet inBuffer[],
1031 Packet inoutBuffer[]
1034 for(
int i = 0; i < count; ++i )
1035 inoutBuffer[i] = inoutBuffer[i] && inBuffer[i];
1040 template<
typename Ordinal,
typename Packet>
1041 class AND<false,Ordinal,Packet> {
1050 true,std::logic_error,
1052 <<
" does not support logical AND operations!" 1061 template<
typename Ordinal,
typename Packet>
1063 const Ordinal count,
1064 const Packet inBuffer[],
1065 Packet inoutBuffer[]
1068 for(
int i = 0; i < count; ++i )
1069 inoutBuffer[i] += inBuffer[i];
1073 template<
typename Ordinal,
typename Packet>
1075 const Ordinal count,
1076 const Packet inBuffer[],
1077 Packet inoutBuffer[]
1080 typedef MixMaxUtilities::Min<ScalarTraits<Packet>::isComparable, Ordinal, Packet> min_type;
1081 min_type::min (count, inBuffer, inoutBuffer);
1085 template<
typename Ordinal,
typename Packet>
1087 const Ordinal count,
1088 const Packet inBuffer[],
1089 Packet inoutBuffer[]
1092 typedef MixMaxUtilities::Max<ScalarTraits<Packet>::isComparable, Ordinal, Packet> max_type;
1093 max_type::max (count,inBuffer,inoutBuffer);
1097 template<
typename Ordinal,
typename Packet>
1099 const Ordinal count,
1100 const Packet inBuffer[],
1101 Packet inoutBuffer[]
1104 typedef MixMaxUtilities::AND<ScalarTraits<Packet>::isComparable, Ordinal, Packet> and_type;
1105 and_type::andOp (count, inBuffer, inoutBuffer);
1135 template<
typename Ordinal,
typename Packet>
1137 createOp (
const EReductionType reductType)
1140 switch (reductType) {
1145 if (ST::isComparable) {
1150 (! ST::isComparable, std::invalid_argument,
"Teuchos::createOp" 1152 <<
" is not less-than comparable, so it does not make sense to do a " 1153 "MIN reduction with it.");
1157 if (ST::isComparable) {
1162 (! ST::isComparable, std::invalid_argument,
"Teuchos::createOp" 1164 <<
" is not less-than comparable, so it does not make sense to do a " 1165 "MAX reduction with it.");
1173 true, std::invalid_argument,
"Teuchos::createOp(EReductionType): " 1174 "Invalid EReductionType value " << reductType <<
". Valid values " 1175 "include REDUCE_SUM, REDUCE_MIN, REDUCE_MAX, and REDUCE_AND.");
1188 template<
typename Ordinal>
1195 template<
typename Ordinal>
1202 template<
typename Ordinal>
1205 TEUCHOS_COMM_TIME_MONITOR(
1206 "Teuchos::CommHelpers: barrier<" 1214 template<
typename Ordinal,
typename Packet>
1215 void Teuchos::broadcast(
1217 const int rootRank,
const Ordinal count, Packet buffer[]
1220 TEUCHOS_COMM_TIME_MONITOR(
1221 "Teuchos::CommHelpers: broadcast<" 1226 charBuffer(count,buffer);
1228 rootRank,charBuffer.getBytes(),charBuffer.getCharBuffer()
1233 template<
typename Ordinal,
typename Packet>
1234 void Teuchos::broadcast(
1240 broadcast<Ordinal, Packet>(comm, rootRank, buffer.
size(), buffer.
getRawPtr() );
1244 template<
typename Ordinal,
typename Packet>
1245 void Teuchos::broadcast(
1247 const int rootRank, Packet *
object 1250 broadcast<Ordinal,Packet>(comm,rootRank,1,object);
1254 template<
typename Ordinal,
typename Packet>
1255 void Teuchos::broadcast(
1260 broadcast<Ordinal,Packet>(comm,rootRank,1,
object.getRawPtr());
1264 template<
typename Ordinal,
typename Packet>
1265 void Teuchos::broadcast(
1267 const int rootRank,
const Ordinal count, Packet*
const buffer[]
1270 TEUCHOS_COMM_TIME_MONITOR(
1271 "Teuchos::CommHelpers: broadcast<" 1273 <<
">( reference type )" 1276 charBuffer(serializer, count, buffer);
1283 template<
typename Ordinal,
typename Packet>
1284 void Teuchos::broadcast(
1290 for (
int i = 0; i < buffer.
size(); ++i) {
1291 bufferPtrArray.
push_back(buffer[i].getRawPtr());
1293 broadcast<Ordinal,Packet>(comm, serializer, rootRank,
1297 template<
typename Ordinal,
typename Packet,
typename Serializer>
1298 void Teuchos::broadcast(
1301 const int rootRank,
const Ordinal count, Packet buffer[]
1304 TEUCHOS_COMM_TIME_MONITOR(
1305 "Teuchos::CommHelpers: broadcast<" 1310 charBuffer(count,buffer,
rcp(&serializer,
false));
1312 rootRank,charBuffer.getBytes(),charBuffer.getCharBuffer()
1317 template<
typename Ordinal,
typename Packet>
1318 void Teuchos::gatherAll(
1320 const Ordinal sendCount,
const Packet sendBuffer[],
1321 const Ordinal recvCount, Packet recvBuffer[]
1324 TEUCHOS_COMM_TIME_MONITOR(
1325 "Teuchos::CommHelpers: gatherAll<" 1330 charSendBuffer(sendCount,sendBuffer);
1332 charRecvBuffer(recvCount,recvBuffer);
1334 charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
1335 ,charRecvBuffer.getBytes(),charRecvBuffer.getCharBuffer()
1339 template<
typename Ordinal,
typename Packet>
1341 Teuchos::gather (
const Packet sendBuf[],
1342 const Ordinal sendCount,
1344 const Ordinal recvCount,
1348 TEUCHOS_COMM_TIME_MONITOR(
1349 "Teuchos::CommHelpers: gather<" 1354 charSendBuffer (sendCount, sendBuf);
1356 charRecvBuffer (recvCount, recvBuf);
1357 comm.
gather (charSendBuffer.getBytes (),
1358 charSendBuffer.getCharBuffer (),
1359 charRecvBuffer.getBytes (),
1360 charRecvBuffer.getCharBuffer (),
1364 template<
typename Ordinal,
typename Packet>
1366 Teuchos::gatherv (
const Packet sendBuf[],
1367 const Ordinal sendCount,
1369 const Ordinal recvCounts[],
1370 const Ordinal displs[],
1395 "Teuchos::gatherv: The general case is not implemented.");
1398 template<
typename Ordinal,
typename Packet>
1399 void Teuchos::gatherAll(
1401 const Ordinal sendCount,
const Packet*
const sendBuffer[],
1402 const Ordinal recvCount, Packet*
const recvBuffer[]
1408 template<
typename Ordinal,
typename Packet,
typename Serializer>
1409 void Teuchos::gatherAll(
1412 const Ordinal sendCount,
const Packet sendBuffer[],
1413 const Ordinal recvCount, Packet recvBuffer[]
1416 TEUCHOS_COMM_TIME_MONITOR(
1417 "Teuchos::CommHelpers: gatherAll<" 1422 charSendBuffer(sendCount,sendBuffer,
rcp(&serializer,
false));
1424 charRecvBuffer(recvCount,recvBuffer,
rcp(&serializer,
false));
1426 charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
1427 ,charRecvBuffer.getBytes(),charRecvBuffer.getCharBuffer()
1432 template<
typename Ordinal,
typename Packet>
1434 Teuchos::reduce (
const Packet sendBuf[],
1436 const Ordinal count,
1437 const EReductionType reductType,
1445 (
true, std::logic_error,
"Teuchos::reduce<" <<
1447 <<
">: Generic version not implemented. We only implement this function " 1448 "for Ordinal = int and Packet = specific types.");
1452 template<
typename Ordinal,
typename Packet>
1455 ,
const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
1458 TEUCHOS_COMM_TIME_MONITOR(
1459 "Teuchos::CommHelpers: reduceAll<" 1461 <<
">( value type, user-defined op )" 1464 charSendBuffer(count,sendBuffer);
1466 charGlobalReducts(count,globalReducts);
1468 charReductOp(
rcp(&reductOp,
false));
1470 charReductOp,charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
1471 ,charGlobalReducts.getCharBuffer()
1476 template<
typename Ordinal,
typename Packet>
1479 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
1482 TEUCHOS_COMM_TIME_MONITOR(
1483 "Teuchos::CommHelpers: reduceAll<" 1485 <<
">( value type, "<<toString(reductType)<<
" )" 1489 createOp<Ordinal, Packet> (reductType);
1491 reduceAll(comm,*reductOp,count,sendBuffer,globalReducts);
1493 catch (std::exception& e) {
1509 #ifdef HAVE_TEUCHOS_COMPLEX 1512 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1513 reduceAll<int, std::complex<double> > (
const Comm<int>& comm,
1514 const EReductionType reductType,
1516 const std::complex<double> sendBuffer[],
1517 std::complex<double> globalReducts[]);
1520 ireceive<int, std::complex<double> > (
const Comm<int>& comm,
1522 const int sourceRank);
1526 const int sourceRank,
1530 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1531 send<int, std::complex<double> > (
const Comm<int>& comm,
1533 const std::complex<double> sendBuffer[],
1534 const int destRank);
1536 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1537 send<int, std::complex<double> > (
const std::complex<double> sendBuffer[],
1551 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1552 reduceAll<int, std::complex<float> > (
const Comm<int>& comm,
1553 const EReductionType reductType,
1555 const std::complex<float> sendBuffer[],
1556 std::complex<float> globalReducts[]);
1559 ireceive<int, std::complex<float> > (
const Comm<int>& comm,
1561 const int sourceRank);
1565 const int sourceRank,
1569 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1570 send<int, std::complex<float> > (
const Comm<int>& comm,
1572 const std::complex<float> sendBuffer[],
1573 const int destRank);
1575 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1576 send<int, std::complex<float> > (
const std::complex<float> sendBuffer[],
1587 #endif // HAVE_TEUCHOS_COMPLEX 1592 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1593 reduceAll<int, double> (
const Comm<int>& comm,
1594 const EReductionType reductType,
1596 const double sendBuffer[],
1597 double globalReducts[]);
1600 ireceive<int, double> (
const Comm<int>& comm,
1602 const int sourceRank);
1606 const int sourceRank,
1610 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1611 send<int, double> (
const Comm<int>& comm,
1613 const double sendBuffer[],
1614 const int destRank);
1616 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1617 send<int, double> (
const double sendBuffer[],
1631 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1632 reduceAll<int, float> (
const Comm<int>& comm,
1633 const EReductionType reductType,
1635 const float sendBuffer[],
1636 float globalReducts[]);
1639 ireceive<int, float> (
const Comm<int>& comm,
1641 const int sourceRank);
1645 const int sourceRank,
1649 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1650 send<int, float> (
const Comm<int>& comm,
1652 const float sendBuffer[],
1653 const int destRank);
1655 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1656 send<int, float> (
const float sendBuffer[],
1668 #ifdef HAVE_TEUCHOS_LONG_LONG_INT 1671 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1672 gather<int, long long> (
const long long sendBuf[],
1673 const int sendCount,
1674 long long recvBuf[],
1675 const int recvCount,
1679 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1680 gatherv<int, long long> (
const long long sendBuf[],
1681 const int sendCount,
1682 long long recvBuf[],
1683 const int recvCounts[],
1688 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1689 reduceAll<int, long long> (
const Comm<int>& comm,
1690 const EReductionType reductType,
1692 const long long sendBuffer[],
1693 long long globalReducts[]);
1696 ireceive<int, long long> (
const Comm<int>& comm,
1698 const int sourceRank);
1702 const int sourceRank,
1706 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1707 send<int, long long> (
const Comm<int>& comm,
1709 const long long sendBuffer[],
1710 const int destRank);
1712 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1713 send<int, long long> (
const long long sendBuffer[],
1727 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1728 gather<int, unsigned long long> (
const unsigned long long sendBuf[],
1729 const int sendCount,
1730 unsigned long long recvBuf[],
1731 const int recvCount,
1735 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1736 gatherv<int, unsigned long long> (
const unsigned long long sendBuf[],
1737 const int sendCount,
1738 unsigned long long recvBuf[],
1739 const int recvCounts[],
1744 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1745 reduceAll<int, unsigned long long> (
const Comm<int>& comm,
1746 const EReductionType reductType,
1748 const unsigned long long sendBuffer[],
1749 unsigned long long globalReducts[]);
1752 ireceive<int, unsigned long long> (
const Comm<int>& comm,
1754 const int sourceRank);
1758 const int sourceRank,
1762 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1763 send<int, unsigned long long> (
const Comm<int>& comm,
1765 const unsigned long long sendBuffer[],
1766 const int destRank);
1768 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1769 send<int, unsigned long long> (
const unsigned long long sendBuffer[],
1780 #endif // HAVE_TEUCHOS_LONG_LONG_INT 1784 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1785 gather<int, long> (
const long sendBuf[],
1786 const int sendCount,
1788 const int recvCount,
1792 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1793 gatherv<int, long> (
const long sendBuf[],
1794 const int sendCount,
1796 const int recvCounts[],
1801 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1802 reduceAll<int, long> (
const Comm<int>& comm,
1803 const EReductionType reductType,
1805 const long sendBuffer[],
1806 long globalReducts[]);
1809 ireceive<int, long> (
const Comm<int>& comm,
1811 const int sourceRank);
1815 const int sourceRank,
1819 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1822 const long sendBuffer[],
1823 const int destRank);
1825 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1826 send<int, long> (
const long sendBuffer[],
1840 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1841 gather<int, unsigned long> (
const unsigned long sendBuf[],
1842 const int sendCount,
1843 unsigned long recvBuf[],
1844 const int recvCount,
1848 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1849 gatherv<int, unsigned long> (
const unsigned long sendBuf[],
1850 const int sendCount,
1851 unsigned long recvBuf[],
1852 const int recvCounts[],
1857 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1858 reduceAll<int, unsigned long> (
const Comm<int>& comm,
1859 const EReductionType reductType,
1861 const unsigned long sendBuffer[],
1862 unsigned long globalReducts[]);
1865 ireceive<int, unsigned long> (
const Comm<int>& comm,
1867 const int sourceRank);
1871 const int sourceRank,
1875 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1876 send<int, unsigned long> (
const Comm<int>& comm,
1878 const unsigned long sendBuffer[],
1879 const int destRank);
1881 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1882 send<int, unsigned long> (
const unsigned long sendBuffer[],
1896 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1897 gather<int, int> (
const int sendBuf[],
1898 const int sendCount,
1900 const int recvCount,
1904 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1905 gatherv<int, int> (
const int sendBuf[],
1906 const int sendCount,
1908 const int recvCounts[],
1913 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1914 scatter (
const int sendBuf[],
1915 const int sendCount,
1917 const int recvCount,
1921 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1922 reduce<int, int> (
const int sendBuf[],
1925 const EReductionType reductType,
1929 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1930 reduceAll<int, int> (
const Comm<int>& comm,
1931 const EReductionType reductType,
1933 const int sendBuffer[],
1934 int globalReducts[]);
1938 ireceive<int, int> (
const Comm<int>& comm,
1940 const int sourceRank);
1944 const int sourceRank,
1948 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1951 const int sendBuffer[],
1952 const int destRank);
1954 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1955 send<int, int> (
const int sendBuffer[],
1969 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1970 gather<int, unsigned int> (
const unsigned int sendBuf[],
1971 const int sendCount,
1972 unsigned int recvBuf[],
1973 const int recvCount,
1977 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1978 gatherv<int, unsigned int> (
const unsigned int sendBuf[],
1979 const int sendCount,
1980 unsigned int recvBuf[],
1981 const int recvCounts[],
1986 TEUCHOSCOMM_LIB_DLL_EXPORT
void 1987 reduceAll<int, unsigned int> (
const Comm<int>& comm,
1988 const EReductionType reductType,
1990 const unsigned int sendBuffer[],
1991 unsigned int globalReducts[]);
1994 ireceive<int, unsigned int> (
const Comm<int>& comm,
1996 const int sourceRank);
2000 const int sourceRank,
2004 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2005 send<int, unsigned int> (
const Comm<int>& comm,
2007 const unsigned int sendBuffer[],
2008 const int destRank);
2010 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2011 send<int, unsigned int> (
const unsigned int sendBuffer[],
2025 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2026 gather<int, short> (
const short sendBuf[],
2027 const int sendCount,
2029 const int recvCount,
2033 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2034 gatherv<int, short> (
const short sendBuf[],
2035 const int sendCount,
2037 const int recvCounts[],
2042 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2043 reduceAll<int, short> (
const Comm<int>& comm,
2044 const EReductionType reductType,
2046 const short sendBuffer[],
2047 short globalReducts[]);
2050 ireceive<int, short> (
const Comm<int>& comm,
2052 const int sourceRank);
2056 const int sourceRank,
2060 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2061 send<int, short> (
const Comm<int>& comm,
2063 const short sendBuffer[],
2064 const int destRank);
2066 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2067 send<int, short> (
const short sendBuffer[],
2090 TEUCHOSCOMM_LIB_DLL_EXPORT
void 2091 reduceAll<int, char> (
const Comm<int>& comm,
2092 const EReductionType reductType,
2094 const char sendBuffer[],
2095 char globalReducts[]);
2100 template<
typename Ordinal,
typename Packet>
2108 reduceAll<Ordinal,Packet>(comm, reductType, 1, &
send, &*globalReduct);
2112 template<
typename Ordinal,
typename Packet>
2116 const Ordinal count,
const Packet*
const sendBuffer[], Packet*
const globalReducts[]
2119 TEUCHOS_COMM_TIME_MONITOR(
2120 "Teuchos::CommHelpers: reduceAll<" 2122 <<
">( reference type )" 2125 charSendBuffer(serializer,count,sendBuffer);
2127 charGlobalReducts(serializer,count,globalReducts);
2129 charReductOp(
rcp(&serializer,
false),
rcp(&reductOp,
false));
2136 template<
typename Ordinal,
typename Packet,
typename Serializer>
2141 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
2144 TEUCHOS_COMM_TIME_MONITOR(
2145 "Teuchos::CommHelpers: reduceAll<" 2147 <<
">( value type, user-defined op )" 2150 charSendBuffer(count,sendBuffer,
rcp(&serializer,
false));
2152 charGlobalReducts(count,globalReducts,
rcp(&serializer,
false));
2154 charReductOp(
rcp(&reductOp,
false),
rcp(&serializer,
false));
2156 charReductOp,charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
2157 ,charGlobalReducts.getCharBuffer()
2162 template<
typename Ordinal,
typename Packet,
typename Serializer>
2166 const EReductionType reductType,
2167 const Ordinal count,
const Packet sendBuffer[], Packet globalReducts[]
2170 TEUCHOS_COMM_TIME_MONITOR(
2171 "Teuchos::CommHelpers: reduceAll<" 2173 <<
">( value type, "<<toString(reductType)<<
" )" 2177 createOp<Ordinal, Packet> (reductType);
2179 reduceAll(comm,serializer,*reductOp,count,sendBuffer,globalReducts);
2181 catch (std::exception& e) {
2189 template<
typename Ordinal,
typename Packet>
2192 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
2195 TEUCHOS_COMM_TIME_MONITOR(
2196 "Teuchos::CommHelpers: scan<" 2198 <<
">( value type, user-defined op )" 2201 charSendBuffer(count,sendBuffer);
2203 charScanReducts(count,scanReducts);
2205 charReductOp(
rcp(&reductOp,
false));
2207 charReductOp,charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
2208 ,charScanReducts.getCharBuffer()
2213 template<
typename Ordinal,
typename Packet>
2216 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
2219 TEUCHOS_COMM_TIME_MONITOR(
2220 "Teuchos::CommHelpers: scan<" 2222 <<
">( value type, "<<toString(reductType)<<
" )" 2226 createOp<Ordinal, Packet> (reductType);
2228 scan(comm,*reductOp,count,sendBuffer,scanReducts);
2230 catch (std::exception& e) {
2238 template<
typename Ordinal,
typename Packet>
2244 scan<Ordinal,Packet>(comm, reductType, 1, &
send, &*scanReduct);
2248 template<
typename Ordinal,
typename Packet>
2252 const Ordinal count,
const Packet*
const sendBuffer[], Packet*
const scanReducts[]
2258 template<
typename Ordinal,
typename Packet,
typename Serializer>
2263 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
2266 TEUCHOS_COMM_TIME_MONITOR(
2267 "Teuchos::CommHelpers: scan<" 2269 <<
">( value type, user-defined op )" 2272 charSendBuffer(count,sendBuffer,
rcp(&serializer,
false));
2274 charScanReducts(count,scanReducts,
rcp(&serializer,
false));
2276 charReductOp(
rcp(&reductOp,
false),
rcp(&serializer,
false));
2278 charReductOp,charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
2279 ,charScanReducts.getCharBuffer()
2284 template<
typename Ordinal,
typename Packet,
typename Serializer>
2288 const EReductionType reductType,
2289 const Ordinal count,
const Packet sendBuffer[], Packet scanReducts[]
2292 TEUCHOS_COMM_TIME_MONITOR(
2293 "Teuchos::CommHelpers: scan<" 2295 <<
">( value type, "<<toString(reductType)<<
" )" 2299 createOp<Ordinal, Packet> (reductType);
2301 scan(comm,serializer,*reductOp,count,sendBuffer,scanReducts);
2303 catch (std::exception& e) {
2310 template<
typename Ordinal,
typename Packet>
2313 const Ordinal count,
const Packet sendBuffer[],
const int destRank
2316 TEUCHOS_COMM_TIME_MONITOR(
2317 "Teuchos::CommHelpers: send<" 2322 charSendBuffer(count,sendBuffer);
2324 charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
2329 template<
typename Ordinal,
typename Packet>
2332 const Ordinal count,
2337 TEUCHOS_COMM_TIME_MONITOR(
2338 "Teuchos::CommHelpers: send<" 2343 comm.
send (charSendBuffer.getBytes (), charSendBuffer.getCharBuffer (), destRank, tag);
2346 template<
typename Ordinal,
typename Packet>
2349 const Ordinal count,
const Packet sendBuffer[],
const int destRank
2352 TEUCHOS_COMM_TIME_MONITOR(
2353 "Teuchos::CommHelpers: ssend<" 2358 charSendBuffer(count,sendBuffer);
2360 charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
2365 template<
typename Ordinal,
typename Packet>
2368 const Ordinal count,
2373 TEUCHOS_COMM_TIME_MONITOR(
2374 "Teuchos::CommHelpers: ssend<" 2379 buf_type charSendBuffer (count, sendBuffer);
2380 comm.
ssend (charSendBuffer.getBytes (),
2381 charSendBuffer.getCharBuffer (),
2385 template<
typename Ordinal,
typename Packet>
2388 const Packet &
send,
const int destRank
2391 Teuchos::send<Ordinal,Packet>(comm,1,&
send,destRank);
2394 template<
typename Ordinal,
typename Packet>
2397 const Packet &
send,
const int destRank
2400 Teuchos::ssend<Ordinal,Packet>(comm,1,&
send,destRank);
2403 template<
typename Ordinal,
typename Packet>
2406 const Ordinal count,
const Packet*
const sendBuffer[],
const int destRank
2412 template<
typename Ordinal,
typename Packet,
typename Serializer>
2416 const Ordinal count,
const Packet sendBuffer[],
const int destRank
2419 TEUCHOS_COMM_TIME_MONITOR(
2420 "Teuchos::CommHelpers: send<" 2425 charSendBuffer(count,sendBuffer,
rcp(&serializer,
false));
2427 charSendBuffer.getBytes(),charSendBuffer.getCharBuffer()
2432 template<
typename Ordinal,
typename Packet>
2433 int Teuchos::receive(
2435 const int sourceRank,
const Ordinal count, Packet recvBuffer[]
2438 TEUCHOS_COMM_TIME_MONITOR(
2439 "Teuchos::CommHelpers: receive<" 2444 charRecvBuffer(count,recvBuffer);
2447 ,charRecvBuffer.getBytes(),charRecvBuffer.getCharBuffer()
2452 template<
typename Ordinal,
typename Packet>
2453 int Teuchos::receive(
2455 const int sourceRank, Packet *recv
2458 return Teuchos::receive<Ordinal,Packet>(comm,sourceRank,1,recv);
2462 template<
typename Ordinal,
typename Packet>
2463 int Teuchos::receive(
2465 const int sourceRank,
const Ordinal count, Packet*
const recvBuffer[]
2471 template<
typename Ordinal,
typename Packet,
typename Serializer>
2472 int Teuchos::receive(
2475 const int sourceRank,
const Ordinal count, Packet recvBuffer[]
2478 TEUCHOS_COMM_TIME_MONITOR(
2479 "Teuchos::CommHelpers: receive<" 2484 charRecvBuffer(count,recvBuffer,
rcp(&serializer,
false));
2487 ,charRecvBuffer.getBytes(),charRecvBuffer.getCharBuffer()
2491 template<
typename Ordinal,
typename Packet>
2498 TEUCHOS_COMM_TIME_MONITOR(
2499 "Teuchos::CommHelpers: readySend<" 2505 comm.
readySend( charSendBuffer.getCharBufferView(), destRank );
2508 template<
typename Ordinal,
typename Packet>
2511 const Ordinal count,
2516 TEUCHOS_COMM_TIME_MONITOR(
2517 "Teuchos::CommHelpers: readySend<" 2522 buf_type charSendBuffer (count, sendBuffer);
2523 comm.
readySend (charSendBuffer.getBytes (),
2524 charSendBuffer.getCharBuffer (),
2528 template<
typename Ordinal,
typename Packet>
2535 readySend<Ordinal, Packet>( comm, arrayView(&
send,1), destRank );
2538 template<
typename Ordinal,
typename Packet,
typename Serializer>
2546 TEUCHOS_COMM_TIME_MONITOR(
2547 "Teuchos::CommHelpers: readySend<" 2552 charSendBuffer(sendBuffer.
size(), sendBuffer.
getRawPtr(), serializer);
2553 comm.
readySend( charSendBuffer.getCharBufferView(), destRank );
2556 template<
typename Ordinal,
typename Packet>
2564 TEUCHOS_COMM_TIME_MONITOR(
2565 "Teuchos::CommHelpers: isend<" 2572 charSendBuffer.getCharBufferView(), destRank );
2573 set_extra_data( sendBuffer,
"buffer", inOutArg(commRequest) );
2577 template<
typename Ordinal,
typename Packet>
2584 TEUCHOS_COMM_TIME_MONITOR(
2588 charSendBuffer (sendBuffer.
size (), sendBuffer.
getRawPtr ());
2590 comm.
isend (charSendBuffer.getCharBufferView (), destRank, tag);
2591 set_extra_data (sendBuffer,
"buffer", inOutArg (commRequest));
2595 template<
typename Ordinal,
typename Packet>
2604 arcpWithEmbeddedObj( send.
get(), 0, 1,
send, false );
2607 return isend<Ordinal, Packet>( comm, sendBuffer, destRank );
2610 template<
typename Ordinal,
typename Packet,
typename Serializer>
2619 TEUCHOS_COMM_TIME_MONITOR(
2620 "Teuchos::CommHelpers: isend<" 2625 charSendBuffer(sendBuffer.
size(), sendBuffer.
getRawPtr(), serializer);
2627 charSendBuffer.getCharBufferView(), destRank );
2628 set_extra_data( sendBuffer,
"buffer", inOutArg(commRequest) );
2632 template<
typename Ordinal,
typename Packet>
2637 const int sourceRank
2640 TEUCHOS_COMM_TIME_MONITOR(
2645 charRecvBuffer.getCharBufferView(), sourceRank );
2646 set_extra_data( recvBuffer,
"buffer", inOutArg(commRequest) );
2650 template<
typename Ordinal,
typename Packet>
2653 const int sourceRank,
2657 TEUCHOS_COMM_TIME_MONITOR(
2660 charRecvBuffer (recvBuffer.
size (), recvBuffer.
getRawPtr ());
2662 comm.
ireceive (charRecvBuffer.getCharBufferView (), sourceRank, tag);
2663 set_extra_data (recvBuffer,
"buffer", inOutArg (commRequest));
2667 template<
typename Ordinal,
typename Packet>
2672 const int sourceRank
2676 arcpWithEmbeddedObj( recv.
get(), 0, 1, recv, false );
2679 return ireceive<Ordinal, Packet>( comm, recvBuffer, sourceRank );
2682 template<
typename Ordinal,
typename Packet,
typename Serializer>
2688 const int sourceRank
2691 TEUCHOS_COMM_TIME_MONITOR(
2692 "Teuchos::CommHelpers: ireceive<" 2697 charRecvBuffer(recvBuffer.
size(), recvBuffer.
getRawPtr(), serializer);
2699 charRecvBuffer.getCharBufferView(), sourceRank );
2700 set_extra_data( recvBuffer,
"buffer", inOutArg(commRequest) );
2704 template<
typename Ordinal>
2705 void Teuchos::waitAll(
2714 template<
typename Ordinal>
2720 comm.
waitAll (requests, statuses);
2724 template<
typename Ordinal>
2729 return comm.
wait (request);
2733 #endif // TEUCHOS_COMM_HELPERS_HPP virtual void reduceAll(const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char globalReducts[]) const =0
Global reduction.
Strategy interface for the indirect serializing and deserializing objects of a given type handled usi...
char * getCharBuffer() const
Encapsulate how an array of non-const objects with reference sematics is serialized into a char[] arr...
virtual void readySend(const ArrayView< const char > &sendBuffer, const int destRank) const =0
Ready send of data from this process to another process.
EReductionType
Predefined reduction operations that Teuchos::Comm understands.
virtual RCP< CommStatus< Ordinal > > wait(const Ptr< RCP< CommRequest< Ordinal > > > &request) const =0
Wait on a single communication request, and return its status.
virtual void scan(const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char scanReducts[]) const =0
Scan reduction.
size_type size() const
The total number of entries in the array.
virtual RCP< CommRequest< Ordinal > > ireceive(const ArrayView< char > &recvBuffer, const int sourceRank) const =0
Non-blocking receive.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
virtual void send(const Ordinal bytes, const char sendBuffer[], const int destRank) const =0
Possibly blocking send of data from this process to another process.
size_type size() const
The total number of items in the managed array.
T * getRawPtr()
Return a raw pointer to beginning of array or NULL if unsized.
Standard logical AND operator for booleans.
Standard min operator for types with value semantics.
T * get() const
Get the raw C++ pointer to the underlying object.
This structure defines some basic traits for a scalar field type.
Decorator class that uses traits to convert to and from char[] to typed buffers for objects that use ...
virtual void waitAll(const ArrayView< RCP< CommRequest< Ordinal > > > &requests) const =0
Wait on a set of communication requests.
void scatter(const Packet sendBuf[], const Ordinal sendCount, Packet recvBuf[], const Ordinal recvCount, const Ordinal root, const Comm< Ordinal > &comm)
Wrapper for MPI_Scatter; scatter collective.
Namespace of implementation details.
void reduce(const Ordinal count, const Packet inBuffer[], Packet inoutBuffer[]) const
Standard summation operator for types with value semantics.
const char * getCharBuffer() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
virtual void gather(const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[], const int root) const =0
Gather values from all processes to the root process.
virtual void ssend(const Ordinal bytes, const char sendBuffer[], const int destRank) const =0
Always blocking send of data from this process to another process.
TEUCHOS_DEPRECATED void scan(const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *scanReduct)
Deprecated.
Encapsulate how an array of const objects with reference sematics is serialized into a char[] array...
virtual int getRank() const =0
Returns the rank of this process.
Standard Max operator for types with value semantics.
Decorator class that uses a strategy object to convert to and from char[] to typed buffers for object...
Implementation of Teuchos wrappers for MPI.
Declaration of Teuchos::EReductionType enum, and related functions.
virtual RCP< CommRequest< Ordinal > > isend(const ArrayView< const char > &sendBuffer, const int destRank) const =0
Non-blocking send.
This structure defines some basic traits for the ordinal field type.
TEUCHOS_DEPRECATED void reduceAll(const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *globalReduct)
Deprecated .
Encapsulation of the result of a receive (blocking or nonblocking).
void send(const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
Variant of send() that takes a tag (and restores the correct order of arguments). ...
virtual void barrier() const =0
Pause every process in *this communicator until all the processes reach this point.
Encapsulate how an array of non-const objects with value sematics is serialized into a char[] array...
RCP< CommRequest< Ordinal > > ireceive(const ArrayRCP< Packet > &recvBuffer, const int sourceRank, const int tag, const Comm< Ordinal > &comm)
Variant of ireceive that takes a tag argument (and restores the correct order of arguments).
Templated array class derived from the STL std::vector.
Abstract interface for distributed-memory communication.
void push_back(const value_type &x)
T * getRawPtr() const
Return a raw pointer to beginning of array or NULL if unsized.
Defines basic traits for the ordinal field type.
Default traits class that just returns typeid(T).name().
virtual void broadcast(const int rootRank, const Ordinal bytes, char buffer[]) const =0
Broadcast values from the root process to the slave processes.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
Base interface class for user-defined reduction operations for objects that use reference semantics...
virtual void gatherAll(const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[]) const =0
Gather values from each process to collect on all processes.
void ssend(const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
Variant of ssend() that takes a tag (and restores the correct order of arguments).
Defines basic traits for the scalar field type.
Smart reference counting pointer class for automatic garbage collection.
RCP< CommRequest< Ordinal > > isend(const ArrayRCP< const Packet > &sendBuffer, const int destRank, const int tag, const Comm< Ordinal > &comm)
Variant of isend() that takes a tag (and restores the correct order of arguments).
virtual int receive(const int sourceRank, const Ordinal bytes, char recvBuffer[]) const =0
Blocking receive of data from this process to another process.
T * getRawPtr() const
Get the raw C++ pointer to the underlying object.
Encapsulation of a pending nonblocking communication operation.
void reduce(const Ordinal count, const Packet inBuffer[], Packet inoutBuffer[]) const
void reduce(const Ordinal count, const Packet inBuffer[], Packet inoutBuffer[]) const
Defines basic traits returning the name of a type in a portable and readable way. ...
Definition of Teuchos::as, for conversions between types.
void reduce(const Ordinal count, const Packet inBuffer[], Packet inoutBuffer[]) const
void readySend(const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
Variant of readySend() that accepts a message tag.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call...
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...
virtual int getSize() const =0
Returns the number of processes that make up this communicator.
Encapsulate how an array of const objects with value sematics is serialized into a const char[] array...
Reference-counted smart pointer for managing arrays.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...