From 96a4d4997352bcbccecb3e5ecf8658057ac17c04 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 3 Apr 2024 14:46:59 -0400 Subject: [PATCH] Correct member initialization order --- cpp/include/raft/neighbors/cagra_types.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/include/raft/neighbors/cagra_types.hpp b/cpp/include/raft/neighbors/cagra_types.hpp index 807f89fd65..97c9c0d098 100644 --- a/cpp/include/raft/neighbors/cagra_types.hpp +++ b/cpp/include/raft/neighbors/cagra_types.hpp @@ -205,8 +205,8 @@ struct index : ann::index { raft::distance::DistanceType metric = raft::distance::DistanceType::L2Expanded) : ann::index(), metric_(metric), - dataset_(new neighbors::empty_dataset(0)), - graph_(make_device_matrix(res, 0, 0)) + graph_(make_device_matrix(res, 0, 0)), + dataset_(new neighbors::empty_dataset(0)) { } @@ -271,8 +271,8 @@ struct index : ann::index { mdspan, row_major, graph_accessor> knn_graph) : ann::index(), metric_(metric), - dataset_(make_aligned_dataset(res, dataset, 16)), - graph_(make_device_matrix(res, 0, 0)) + graph_(make_device_matrix(res, 0, 0)), + dataset_(make_aligned_dataset(res, dataset, 16)) { RAFT_EXPECTS(dataset.extent(0) == knn_graph.extent(0), "Dataset and knn_graph must have equal number of rows");