make xgcombine buffer work

This commit is contained in:
tqchen
2014-08-17 22:49:36 -07:00
parent 4ed4b08146
commit 0d9a8c042c
5 changed files with 205 additions and 207 deletions

View File

@@ -140,7 +140,7 @@ extern "C"{
for (size_t i = 0; i < len; ++i) {
const int ridx = idxset[i];
SparseBatch::Inst inst = batch[ridx];
utils::Check(ridx < batch.size, "slice index exceed number of rows");
utils::Check(static_cast<size_t>(ridx) < batch.size, "slice index exceed number of rows");
ret.row_data_.resize(ret.row_data_.size() + inst.length);
memcpy(&ret.row_data_[ret.row_ptr_.back()], inst.data,
sizeof(SparseBatch::Entry) * inst.length);