Fix uninitialized class/struct members in public headers#1735
Closed
maxwbuckley wants to merge 4 commits intorapidsai:mainfrom
Closed
Fix uninitialized class/struct members in public headers#1735maxwbuckley wants to merge 4 commits intorapidsai:mainfrom
maxwbuckley wants to merge 4 commits intorapidsai:mainfrom
Conversation
8ee22d9 to
1554e22
Compare
Member
|
/ok to test 01994a4 |
cjnolet
approved these changes
Feb 7, 2026
Member
|
/merge |
Member
|
/ok to test 9fd9475 |
Member
|
/ok to test 5660eec |
Member
|
/ok to test 6811fcf |
Initialize POD members with sensible defaults to prevent undefined behavior when users create instances without explicitly setting all fields: - cluster/agglomerative.hpp: min_samples = 5 - distance/distance.hpp: KernelParams defaults (LINEAR, degree=3, gamma=1.0, coef0=0.0) - distance/grammian.hpp: cublas_handle = nullptr, fix empty constructor syntax - neighbors/ball_cover.hpp: index_trained = false - neighbors/common.hpp: make base_filter destructor virtual, num_ranks_ = 0 - neighbors/hnsw.hpp: ef = 200 - neighbors/vamana.hpp: pq_codebook_size = 0, pq_dim = 0 - preprocessing/spectral_embedding.hpp: n_components=2, n_neighbors=15, etc. Also fixes base_filter to have a virtual destructor for safe polymorphic deletion. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6811fcf to
034f377
Compare
Contributor
Author
|
Rebased onto latest main to pick up the merge barrier commit. Could someone run /ok to test 034f377 when you get a chance? Thanks! |
Member
|
/ok to test 034f377 |
Member
|
/ok to test 986dd69 |
Contributor
|
/ok to test 1e1524a |
Contributor
Author
|
This got accidentally closed when I made my fork private (prototyping something awesome for a paper). Sorry about that will send a new one |
2 tasks
Contributor
Author
|
At first I was wondering how on earth I did this.... #1922 is the replacement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
base_filterto have a virtual destructor for safe polymorphic deletion{};→{}) and use= defaultfor trivial destructorsFiles Changed
cluster/agglomerative.hppmin_samples = 5distance/distance.hppKernelParams:kernel = LINEAR,degree = 3,gamma = 1.0,coef0 = 0.0distance/grammian.hppcublas_handle = nullptr, constructor/destructor cleanupneighbors/ball_cover.hppindex_trained = falseneighbors/common.hppvirtual ~base_filter(),num_ranks_ = 0neighbors/hnsw.hppef = 200neighbors/vamana.hpppq_codebook_size = 0,pq_dim = 0preprocessing/spectral_embedding.hppn_components = 2,n_neighbors = 15,norm_laplacian = true,drop_first = trueTest plan
🤖 Generated with Claude Code