ENH: use UList instead of List for some Pstream gather/scatter

- can use UList signature since the routines do not resize the list
  or attempt to broadcast it: useful for SubList handling.

ENH: add IPstream/OPstream send/recv static methods
This commit is contained in:
Mark Olesen
2024-02-02 17:48:33 +01:00
parent 91a1eaa01b
commit 47c44a5783
14 changed files with 321 additions and 192 deletions

View File

@ -30,6 +30,25 @@ License
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
// Cannot use non-blocking for non-contiguous data.
// template<class Type>
// inline Foam::UPstream::commsTypes getCommsType
// (
// const UPstream::commsTypes preferred
// )
// {
// return
// (
// (
// !is_contiguous<Type>::value
// && UPstream::commsTypes::nonBlocking == preferred
// )
// ? UPstream::commsTypes::scheduled
// : preferred
// );
// }
template<class Addr>
Foam::labelList
Foam::globalIndex::calcOffsets
@ -115,8 +134,7 @@ void Foam::globalIndex::gatherValues
{
// low-level: no parRun guard
// Automatically change from nonBlocking to scheduled for
// non-contiguous data.
// Cannot use non-blocking for non-contiguous data.
const UPstream::commsTypes commsType =
(
(
@ -202,8 +220,7 @@ void Foam::globalIndex::gather
{
// low-level: no parRun guard
// Automatically change from nonBlocking to scheduled for
// non-contiguous data.
// Cannot use non-blocking for non-contiguous data.
const UPstream::commsTypes commsType =
(
(
@ -322,8 +339,7 @@ void Foam::globalIndex::gather
return;
}
// Automatically change from nonBlocking to scheduled for
// non-contiguous data.
// Cannot use non-blocking for non-contiguous data.
const UPstream::commsTypes commsType =
(
(
@ -907,8 +923,7 @@ void Foam::globalIndex::scatter
{
// low-level: no parRun guard
// Automatically change from nonBlocking to scheduled for
// non-contiguous data.
// Cannot use non-blocking for non-contiguous data.
const UPstream::commsTypes commsType =
(
(