Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ahendriksen committed Apr 27, 2023
1 parent 0368286 commit fd8386c
Show file tree
Hide file tree
Showing 30 changed files with 112 additions and 112 deletions.
10 changes: 5 additions & 5 deletions cpp/include/raft/cluster/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void pairwise_matrix_dispatch(OpT distance_op,
cudaStream_t stream,
bool is_row_major) RAFT_EXPLICIT;

}; // namespace raft::distance::detail
}; // namespace raft::distance::detail

#endif // RAFT_EXPLICIT_INSTANTIATE_ONLY

Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/distance/distance-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ void pairwise_distance(raft::resources const& handle,
raft::distance::DistanceType metric,
Type metric_arg = 2.0f) RAFT_EXPLICIT;

}; // namespace distance
}; // namespace raft
}; // namespace distance
}; // namespace raft

#endif // RAFT_EXPLICIT_INSTANTIATE_ONLY

Expand Down
10 changes: 5 additions & 5 deletions cpp/include/raft/distance/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/distance/specializations/distance.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/distance/specializations/fused_l2_nn_min.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/matrix/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/matrix/specializations/detail/select_k.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ auto compute_similarity_select(const cudaDeviceProp& dev_props,
}

{
if (selected_perf.occupancy <= 0.0 // no candidate yet
if (selected_perf.occupancy <= 0.0 // no candidate yet
|| (selected_perf.occupancy < cur.occupancy * kTargetOccupancy &&
selected_perf.shmem_use >= cur.shmem_use) // much improved occupancy
) {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/neighbors/detail/selection_faiss-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void select_k(const key_t* inK,
bool select_min,
int k,
cudaStream_t stream) RAFT_EXPLICIT;
}; // namespace raft::neighbors::detail
}; // namespace raft::neighbors::detail

#endif // RAFT_EXPLICIT_INSTANTIATE_ONLY

Expand Down
6 changes: 3 additions & 3 deletions cpp/include/raft/neighbors/ivf_flat-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#pragma once

#include <cstdint> // int64_t
#include <cstdint> // int64_t

#include <raft/core/device_mdspan.hpp> // raft::device_matrix_view
#include <raft/core/device_resources.hpp> // raft::device_resources
#include <raft/core/device_mdspan.hpp> // raft::device_matrix_view
#include <raft/core/device_resources.hpp> // raft::device_resources
#include <raft/neighbors/ivf_flat_serialize.cuh>
#include <raft/neighbors/ivf_flat_types.hpp> // raft::neighbors::ivf_flat::index
#include <raft/util/raft_explicit.hpp> // RAFT_EXPLICIT
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/neighbors/ivf_pq-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#include <cstdint> // int64_t
#include <cstdint> // int64_t

#include <raft/core/device_mdspan.hpp> // raft::device_matrix_view
#include <raft/core/device_resources.hpp> // raft::device_resources
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/neighbors/refine-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#include <cstdint> // int64_t
#include <cstdint> // int64_t

#include <raft/core/device_mdspan.hpp> // raft::device_matrix_view
#include <raft/core/device_resources.hpp> // raft::device_resources
Expand Down
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations/ball_cover.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations/brute_force.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations/fused_l2_knn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations/ivf_flat.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations/ivf_pq.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/neighbors/specializations/refine.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/sparse/neighbors/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void rbc_low_dim_pass_two(raft::device_resources const& handle,
float weight,
value_int* post_dists_counter) RAFT_EXPLICIT;

}; // namespace raft::spatial::knn::detail
}; // namespace raft::spatial::knn::detail

#endif // RAFT_EXPLICIT_INSTANTIATE_ONLY

Expand Down
10 changes: 5 additions & 5 deletions cpp/include/raft/spatial/knn/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/spatial/knn/specializations/knn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/spectral/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
10 changes: 5 additions & 5 deletions cpp/include/raft/stats/specializations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
#pragma once

#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
3 changes: 1 addition & 2 deletions cpp/include/raft/util/raft_explicit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
#define RAFT_EXPLICIT \
{ \
/* Type of `not_allowed` depends on template parameters of enclosing function. */ \
struct not_allowed { \
}; \
struct not_allowed {}; \
static_assert( \
raft::util::raft_explicit::implicit_instantiation<not_allowed>::value, \
"ACCIDENTAL_IMPLICIT_INSTANTIATION\n\n" \
Expand Down
6 changes: 3 additions & 3 deletions cpp/test/distance/distance_base.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <gtest/gtest.h>
#include <raft/common/nvtx.hpp> // common::nvtx::range

#include <raft/core/device_mdspan.hpp> // make_device_matrix_view
#include <raft/core/device_resources.hpp> // raft::device_resources
#include <raft/core/operators.hpp> // raft::sqrt
#include <raft/core/device_mdspan.hpp> // make_device_matrix_view
#include <raft/core/device_resources.hpp> // raft::device_resources
#include <raft/core/operators.hpp> // raft::sqrt
#include <raft/distance/distance.cuh>
#include <raft/distance/distance_types.hpp> // raft::distance::DistanceType
#include <raft/random/rng.cuh>
Expand Down
3 changes: 2 additions & 1 deletion cpp/test/matrix/select_k.cu
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ struct SelectK // NOLINT
if (i == j) return true;
auto ix_i = static_cast<int64_t>(std::find(in_ids.begin(), in_ids.end(), i) - in_ids.begin());
auto ix_j = static_cast<int64_t>(std::find(in_ids.begin(), in_ids.end(), j) - in_ids.begin());
if (static_cast<size_t>(ix_i) >= in_ids.size() || static_cast<size_t>(ix_j) >= in_ids.size()) return false;
if (static_cast<size_t>(ix_i) >= in_ids.size() || static_cast<size_t>(ix_j) >= in_ids.size())
return false;
auto dist_i = in_dists[ix_i];
auto dist_j = in_dists[ix_j];
if (dist_i == dist_j) return true;
Expand Down

0 comments on commit fd8386c

Please sign in to comment.