| 1047 | } |
| 1048 | |
| 1049 | void GPUTreeLearner::FindBestSplits() { |
| 1050 | SerialTreeLearner::FindBestSplits(); |
| 1051 | |
| 1052 | #if GPU_DEBUG >= 3 |
| 1053 | for (int feature_index = 0; feature_index < num_features_; ++feature_index) { |
| 1054 | if (!is_feature_used_[feature_index]) continue; |
| 1055 | if (parent_leaf_histogram_array_ != nullptr |
| 1056 | && !parent_leaf_histogram_array_[feature_index].is_splittable()) { |
| 1057 | smaller_leaf_histogram_array_[feature_index].set_is_splittable(false); |
| 1058 | continue; |
| 1059 | } |
| 1060 | size_t bin_size = train_data_->FeatureNumBin(feature_index) + 1; |
| 1061 | printf("Feature %d smaller leaf:\n", feature_index); |
| 1062 | PrintHistograms(smaller_leaf_histogram_array_[feature_index].RawData() - 1, bin_size); |
| 1063 | if (larger_leaf_splits_ == nullptr || larger_leaf_splits_->LeafIndex() < 0) { continue; } |
| 1064 | printf("Feature %d larger leaf:\n", feature_index); |
| 1065 | PrintHistograms(larger_leaf_histogram_array_[feature_index].RawData() - 1, bin_size); |
| 1066 | } |
| 1067 | #endif |
| 1068 | } |
| 1069 | |
| 1070 | void GPUTreeLearner::Split(Tree* tree, int best_Leaf, int* left_leaf, int* right_leaf) { |
| 1071 | const SplitInfo& best_split_info = best_split_per_leaf_[best_Leaf]; |
nothing calls this directly
no test coverage detected