mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: add compressed send/recv placeholder (instantiation for integrals)
This commit is contained in:
@ -67,6 +67,12 @@ void Foam::processorLduInterface::send
|
|||||||
|
|
||||||
resizeBuf(byteRecvBuf_, nBytes);
|
resizeBuf(byteRecvBuf_, nBytes);
|
||||||
|
|
||||||
|
if (!nBytes)
|
||||||
|
{
|
||||||
|
// Can skip empty messages
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
commsType,
|
commsType,
|
||||||
@ -164,11 +170,15 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
&& (!std::is_integral<Type>::value && sizeof(scalar) != sizeof(float))
|
&& (!std::is_integral<Type>::value && sizeof(scalar) != sizeof(float))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static const label nCmpts = sizeof(Type)/sizeof(scalar);
|
static const label nCmpts =
|
||||||
label nm1 = (f.size() - 1)*nCmpts;
|
(
|
||||||
label nlast = sizeof(Type)/sizeof(float);
|
// Placeholder value for unusable template instantiation
|
||||||
label nFloats = nm1 + nlast;
|
std::is_integral<Type>::value
|
||||||
label nBytes = nFloats*sizeof(float);
|
? 1
|
||||||
|
: sizeof(Type)/sizeof(scalar)
|
||||||
|
);
|
||||||
|
const label nm1 = (f.size() - 1)*nCmpts;
|
||||||
|
const label nBytes = f.size()*nCmpts*sizeof(float);
|
||||||
|
|
||||||
const scalar *sArray = reinterpret_cast<const scalar*>(f.cdata());
|
const scalar *sArray = reinterpret_cast<const scalar*>(f.cdata());
|
||||||
const scalar *slast = &sArray[nm1];
|
const scalar *slast = &sArray[nm1];
|
||||||
@ -250,11 +260,15 @@ void Foam::processorLduInterface::compressedReceive
|
|||||||
&& (!std::is_integral<Type>::value && sizeof(scalar) != sizeof(float))
|
&& (!std::is_integral<Type>::value && sizeof(scalar) != sizeof(float))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static const label nCmpts = sizeof(Type)/sizeof(scalar);
|
static const label nCmpts =
|
||||||
label nm1 = (f.size() - 1)*nCmpts;
|
(
|
||||||
label nlast = sizeof(Type)/sizeof(float);
|
// Placeholder value for unusable template instantiation
|
||||||
label nFloats = nm1 + nlast;
|
std::is_integral<Type>::value
|
||||||
label nBytes = nFloats*sizeof(float);
|
? 1
|
||||||
|
: sizeof(Type)/sizeof(scalar)
|
||||||
|
);
|
||||||
|
const label nm1 = (f.size() - 1)*nCmpts;
|
||||||
|
const label nBytes = f.size()*nCmpts*sizeof(float);
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user