Unverified Commit e81eaaaf authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

remove unused BinMapper::SizeForSpecificBin() (#4643)


Co-authored-by: default avatarNikita Titov <nekit94-12@hotmail.com>
parent 10e0edc4
......@@ -160,13 +160,6 @@ class BinMapper {
void FindBin(double* values, int num_values, size_t total_sample_cnt, int max_bin, int min_data_in_bin, int min_split_data, bool pre_filter, BinType bin_type,
bool use_missing, bool zero_as_missing, const std::vector<double>& forced_upper_bounds);
/*!
* \brief Use specific number of bin to calculate the size of this class
* \param bin The number of bin
* \return Size
*/
static int SizeForSpecificBin(int bin);
/*!
* \brief Serializing this object to buffer
* \param buffer The destination
......
......@@ -519,21 +519,6 @@ namespace LightGBM {
}
}
int BinMapper::SizeForSpecificBin(int bin) {
int size = 0;
size += static_cast<int>(VirtualFileWriter::AlignedSize(sizeof(int)));
size +=
static_cast<int>(VirtualFileWriter::AlignedSize(sizeof(MissingType)));
size += static_cast<int>(VirtualFileWriter::AlignedSize(sizeof(bool)));
size += sizeof(double);
size += static_cast<int>(VirtualFileWriter::AlignedSize(sizeof(BinType)));
size += 2 * sizeof(double);
size += bin * sizeof(double);
size += static_cast<int>(VirtualFileWriter::AlignedSize(sizeof(uint32_t))) * 2;
return size;
}
void BinMapper::CopyTo(char * buffer) const {
std::memcpy(buffer, &num_bin_, sizeof(num_bin_));
buffer += VirtualFileWriter::AlignedSize(sizeof(num_bin_));
......
Markdown is supported
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