Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
e81eaaaf
Unverified
Commit
e81eaaaf
authored
Oct 04, 2021
by
James Lamb
Committed by
GitHub
Oct 05, 2021
Browse files
remove unused BinMapper::SizeForSpecificBin() (#4643)
Co-authored-by:
Nikita Titov
<
nekit94-12@hotmail.com
>
parent
10e0edc4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
22 deletions
+0
-22
include/LightGBM/bin.h
include/LightGBM/bin.h
+0
-7
src/io/bin.cpp
src/io/bin.cpp
+0
-15
No files found.
include/LightGBM/bin.h
View file @
e81eaaaf
...
@@ -160,13 +160,6 @@ class BinMapper {
...
@@ -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
,
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
);
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
* \brief Serializing this object to buffer
* \param buffer The destination
* \param buffer The destination
...
...
src/io/bin.cpp
View file @
e81eaaaf
...
@@ -519,21 +519,6 @@ namespace LightGBM {
...
@@ -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
{
void
BinMapper
::
CopyTo
(
char
*
buffer
)
const
{
std
::
memcpy
(
buffer
,
&
num_bin_
,
sizeof
(
num_bin_
));
std
::
memcpy
(
buffer
,
&
num_bin_
,
sizeof
(
num_bin_
));
buffer
+=
VirtualFileWriter
::
AlignedSize
(
sizeof
(
num_bin_
));
buffer
+=
VirtualFileWriter
::
AlignedSize
(
sizeof
(
num_bin_
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment