Commit c6a56d47 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Generalize pioBufferPartData to accept arbitrary input data.

* Introduces a specialization that fulfills the old interface.
parent 782a19c7
......@@ -598,9 +598,10 @@ cdiPioRDMAProgress()
}
void
pioBufferPartData(int streamID, int varID, const double *data,
int nmiss, Xt_idxlist partDesc)
static void
pioBufferPartData_(int streamID, int varID,
const void *packData, valPackFunc packDataFunc,
int nmiss, Xt_idxlist partDesc)
{
int vlistID, collID = CDI_UNDEFID;
......@@ -612,14 +613,10 @@ pioBufferPartData(int streamID, int varID, const double *data,
collWait(collID);
Xt_int chunk = xt_idxlist_get_num_indices(partDesc);
xassert(chunk <= INT_MAX);
struct winHeaderEntry dataHeader
= { .id = streamID, .specific.dataRecord = { varID, nmiss }, .offset = -1 };
modelWinEnqueue(collID, dataHeader,
&(struct memCpyDataDesc){data, chunk * sizeof (data[0])},
memcpyPackFunc);
modelWinEnqueue(collID, dataHeader, packData, packDataFunc);
{
struct winHeaderEntry partHeader
= { .id = PARTDESCMARKER,
......@@ -631,6 +628,18 @@ pioBufferPartData(int streamID, int varID, const double *data,
txWin[collID].refuseFuncCall = 1;
}
void
pioBufferPartData(int streamID, int varID, const double *data,
int nmiss, Xt_idxlist partDesc)
{
int chunk = xt_idxlist_get_num_indices(partDesc);
xassert(chunk <= INT_MAX);
pioBufferPartData_(streamID, varID,
&(struct memCpyDataDesc){data, chunk * sizeof (data[0])},
memcpyPackFunc,
nmiss, partDesc);
}
/************************************************************************/
void pioBufferFuncCall(struct winHeaderEntry header,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment