Block transfer for active cell info

This commit is contained in:
Magne Sjaastad
2014-04-15 14:03:41 +02:00
parent 19b655542a
commit e799a25c2e
2 changed files with 4 additions and 17 deletions

View File

@@ -132,20 +132,9 @@ public:
quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(qint32));
socketStream << timestepByteCount;
// Then write the data.
for (size_t tIdx = 0; tIdx < columnCount; ++tIdx)
{
#if 1 // Write data as raw bytes, fast but does not handle byteswapping
RiaSocketTools::writeBlockData(server, server->currentClient(), (const char *)activeCellInfo[tIdx].data(), timestepByteCount);
#else // Write data using QDataStream, does byteswapping for us. Must use QDataStream on client as well
for (size_t cIdx = 0; cIdx < activeCellInfo[tIdx].size(); ++cIdx)
{
socketStream << activeCellInfo[tIdx][cIdx];
}
#endif
}
// Write data as raw bytes, fast but does not handle byteswapping
RiaSocketTools::writeBlockData(server, server->currentClient(), (const char *)activeCellInfo.data(), columnCount*timestepByteCount);
return true;
}