Use int32_t explicitly when serializing version (#2389)
Use int32_t explicitly when serializing version field of dmatrix in binary format. On ILP64 architectures, although very little, size of int is 64 bits.
This commit is contained in:
parent
85b2fb3eee
commit
2ae56ca84f
@ -33,7 +33,7 @@ void MetaInfo::Clear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MetaInfo::SaveBinary(dmlc::Stream *fo) const {
|
void MetaInfo::SaveBinary(dmlc::Stream *fo) const {
|
||||||
int version = kVersion;
|
int32_t version = kVersion;
|
||||||
fo->Write(&version, sizeof(version));
|
fo->Write(&version, sizeof(version));
|
||||||
fo->Write(&num_row, sizeof(num_row));
|
fo->Write(&num_row, sizeof(num_row));
|
||||||
fo->Write(&num_col, sizeof(num_col));
|
fo->Write(&num_col, sizeof(num_col));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user