From 13ef7ec76c5e1b625f726cdcf5fc089b33b2078e Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 14 May 2024 11:06:12 -0400 Subject: [PATCH] Fix more issues found via warnings --- cpp/src/neighbors/ivf_pq_index.cpp | 6 +++--- cpp/test/neighbors/ann_ivf_pq.cuh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/src/neighbors/ivf_pq_index.cpp b/cpp/src/neighbors/ivf_pq_index.cpp index 1e1919867..fcb2c976d 100644 --- a/cpp/src/neighbors/ivf_pq_index.cpp +++ b/cpp/src/neighbors/ivf_pq_index.cpp @@ -47,13 +47,13 @@ index::index(raft::resources const& handle, pq_bits_(pq_bits), pq_dim_(pq_dim == 0 ? calculate_pq_dim(dim) : pq_dim), conservative_memory_allocation_(conservative_memory_allocation), - pq_centers_{raft::make_device_mdarray(handle, make_pq_centers_extents())}, lists_{n_lists}, - rotation_matrix_{ - raft::make_device_matrix(handle, this->rot_dim(), this->dim())}, list_sizes_{raft::make_device_vector(handle, n_lists)}, + pq_centers_{raft::make_device_mdarray(handle, make_pq_centers_extents())}, centers_{raft::make_device_matrix(handle, n_lists, this->dim_ext())}, centers_rot_{raft::make_device_matrix(handle, n_lists, this->rot_dim())}, + rotation_matrix_{ + raft::make_device_matrix(handle, this->rot_dim(), this->dim())}, data_ptrs_{raft::make_device_vector(handle, n_lists)}, inds_ptrs_{raft::make_device_vector(handle, n_lists)}, accum_sorted_sizes_{raft::make_host_vector(n_lists + 1)} diff --git a/cpp/test/neighbors/ann_ivf_pq.cuh b/cpp/test/neighbors/ann_ivf_pq.cuh index d5fc0d0b7..1f0252b7f 100644 --- a/cpp/test/neighbors/ann_ivf_pq.cuh +++ b/cpp/test/neighbors/ann_ivf_pq.cuh @@ -354,8 +354,8 @@ class ivf_pq_test : public ::testing::TestWithParam { cuvs::Compare{})); // Another test with the API that take list_data directly - auto list_data = index->lists()[label]->data.view(); - uint32_t n_take = 4; + [[maybe_unused]] auto list_data = index->lists()[label]->data.view(); + uint32_t n_take = 4; ASSERT_TRUE(row_offset + n_take < n_rows); auto codes2 = raft::make_device_matrix(handle_, n_take, index->pq_dim()); ivf_pq::helpers::codepacker::unpack_list_data(