ENH: Pstream: shortcut on single processor

This commit is contained in:
mattijs
2013-05-02 15:53:07 +01:00
parent 96977d4b18
commit 900d572a6e
4 changed files with 11 additions and 11 deletions

View File

@ -55,7 +55,7 @@ void Pstream::combineGather
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -182,7 +182,7 @@ void Pstream::combineScatter
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -287,7 +287,7 @@ void Pstream::listCombineGather
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -421,7 +421,7 @@ void Pstream::listCombineScatter
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -540,7 +540,7 @@ void Pstream::mapCombineGather
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -640,7 +640,7 @@ void Pstream::mapCombineScatter
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];

View File

@ -81,7 +81,7 @@ void Pstream::exchange
// Send sizes across. Note: blocks.
combineReduce(sizes, UPstream::listEq(), tag, comm);
if (Pstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
label startOfRequests = Pstream::nRequests();

View File

@ -52,7 +52,7 @@ void Pstream::gather
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -151,7 +151,7 @@ void Pstream::scatter
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];

View File

@ -53,7 +53,7 @@ void Pstream::gatherList
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
if (Values.size() != UPstream::nProcs(comm))
{
@ -212,7 +212,7 @@ void Pstream::scatterList
const label comm
)
{
if (UPstream::parRun())
if (UPstream::nProcs(comm) > 1)
{
if (Values.size() != UPstream::nProcs(comm))
{