Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define bin type. #7850

Merged
merged 1 commit into from
Apr 29, 2022
Merged

Define bin type. #7850

merged 1 commit into from
Apr 29, 2022

Conversation

trivialfis
Copy link
Member

This PR defines a bst_bin_t similar to bst_feature_t and friends. The conversions
between signedness in function calls and returns are confusing sometimes. I hope that we
can unify them in the future. Also, this provides a better document for the parameters
like index_base, at least we should know from the first glance that it's referring to
something related to histogram bins.

I chose int32_t instead of uint32_t as sometimes we use -1 to indicate an invalid bin.

This PR defines a `bst_bin_t` similar to `bst_feature_t` and friends. The conversions
between signedness in function calls and returns are confusing sometimes. I hope that we
can unify them in the future. Also, this provides a better document for the parameters
like `index_base`, at least we should know from the first glance that it's referring to
something related to histogram bins.
@trivialfis trivialfis merged commit 288c525 into dmlc:master Apr 29, 2022
@trivialfis trivialfis deleted the bin_idx_t branch April 29, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants