提交 fdd40e55 编写于 作者: Y Yu Yang

Fix 32-bit gcc compile warnings.

Change-Id: Ibc39ca1d1a27d0d28569e29f41a5647659f8c764
上级 7ad55a4e
...@@ -278,7 +278,7 @@ void ParameterClient2::prepareSendData( ...@@ -278,7 +278,7 @@ void ParameterClient2::prepareSendData(
if (sendingPara) { if (sendingPara) {
sendJob->parallelInputIovs[serverId].push_back( sendJob->parallelInputIovs[serverId].push_back(
{sendMat->getLocalRow(row), sizeof(real) * blockSize}); {sendMat->getLocalRow(row), sizeof(real) * (size_t) blockSize});
/// detect sparse parameter distribution /// detect sparse parameter distribution
sparseDistribution_->probeDistribution(serverId, sparseDistribution_->probeDistribution(serverId,
sizeof(real) * blockSize); sizeof(real) * blockSize);
...@@ -302,8 +302,8 @@ void ParameterClient2::prepareSendData( ...@@ -302,8 +302,8 @@ void ParameterClient2::prepareSendData(
block->set_begin_pos(beginDim); block->set_begin_pos(beginDim);
block->set_block_size(endDim - beginDim); block->set_block_size(endDim - beginDim);
if (buf) { if (buf) {
sendJob->parallelInputIovs[serverId].push_back( sendJob->parallelInputIovs[serverId].push_back({buf + beginDim,
{buf + beginDim, sizeof(real) * (endDim - beginDim)}); sizeof(real) * ((size_t) (endDim - beginDim))});
} }
} }
} }
......
...@@ -724,7 +724,7 @@ void ParameterServer2::sendBackParameter(const ParameterBlock& block, ...@@ -724,7 +724,7 @@ void ParameterServer2::sendBackParameter(const ParameterBlock& block,
<< " id=" << block.para_id() << " block id=" << block.block_id(); << " id=" << block.para_id() << " block id=" << block.block_id();
real* valueBuffer = vectors_[parameterType]->getPoint(offset); real* valueBuffer = vectors_[parameterType]->getPoint(offset);
outputBuffers->push_back({valueBuffer, block.block_size()}); outputBuffers->push_back({valueBuffer, (size_t) block.block_size()});
} }
void ParameterServer2::sendBackParameter(const ParameterBlock& block, void ParameterServer2::sendBackParameter(const ParameterBlock& block,
......
...@@ -148,7 +148,8 @@ void SocketChannel::writeMessage(const std::vector<struct iovec>& userIovs) { ...@@ -148,7 +148,8 @@ void SocketChannel::writeMessage(const std::vector<struct iovec>& userIovs) {
std::vector<iovec> iovs; std::vector<iovec> iovs;
iovs.reserve(userIovs.size() + 2); iovs.reserve(userIovs.size() + 2);
iovs.push_back({&header, sizeof(header)}); iovs.push_back({&header, sizeof(header)});
iovs.push_back({&iovLengths[0], sizeof(iovLengths[0]) * header.numIovs}); iovs.push_back({&iovLengths[0],
sizeof(iovLengths[0]) * (size_t) header.numIovs});
iovs.insert(iovs.end(), userIovs.begin(), userIovs.end()); iovs.insert(iovs.end(), userIovs.begin(), userIovs.end());
header.totalLength = 0; header.totalLength = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册