Skip to content

Commit

Permalink
add static assert
Browse files Browse the repository at this point in the history
  • Loading branch information
benfred committed Dec 15, 2023
1 parent 6a7cbb7 commit f71f657
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/bench/ann/src/raft/raft_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ template <typename T>
RaftGpu<T>::RaftGpu(Metric metric, int dim)
: ANN<T>(metric, dim), metric_type_(raft_temp::parse_metric_type(metric))
{
static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>,
"raft bfknn only supports float/double");
RAFT_CUDA_TRY(cudaGetDevice(&device_));
}

Expand Down

0 comments on commit f71f657

Please sign in to comment.