diff --git a/cpp/include/raft/neighbors/ivf_pq_helpers.cuh b/cpp/include/raft/neighbors/ivf_pq_helpers.cuh index fd2d61a0d0..d0bc6a936e 100644 --- a/cpp/include/raft/neighbors/ivf_pq_helpers.cuh +++ b/cpp/include/raft/neighbors/ivf_pq_helpers.cuh @@ -660,9 +660,9 @@ void set_centers(raft::resources const& res, template auto get_list_size_in_bytes(const index& index, uint32_t label) -> uint32_t { - RAFT_EXPECTS(label < index->n_lists(), + RAFT_EXPECTS(label < index.n_lists(), "Expected label to be less than number of lists in the index"); - auto list_data = index->lists()[label]->data; + auto list_data = index.lists()[label]->data; return list_data.size(); }