Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add except + to cython extern cdef declarations #1001

Merged
merged 2 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/pylibraft/pylibraft/cluster/kmeans.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cdef extern from "raft_distance/kmeans.hpp" \
const double *centroids,
const int* labels,
double *new_centroids,
double *weight_per_cluster)
double *weight_per_cluster) except +

cdef void update_centroids(
const handle_t& handle,
Expand All @@ -64,7 +64,7 @@ cdef extern from "raft_distance/kmeans.hpp" \
const float *centroids,
const int* labels,
float *new_centroids,
float *weight_per_cluster)
float *weight_per_cluster) except +


@auto_sync_handle
Expand Down
4 changes: 2 additions & 2 deletions python/pylibraft/pylibraft/distance/fused_l2_nn.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cdef extern from "raft_distance/fused_l2_min_arg.hpp" \
int m,
int n,
int k,
bool sqrt)
bool sqrt) except +

void fused_l2_nn_min_arg(
const handle_t &handle,
Expand All @@ -57,7 +57,7 @@ cdef extern from "raft_distance/fused_l2_min_arg.hpp" \
int m,
int n,
int k,
bool sqrt)
bool sqrt) except +


@auto_sync_handle
Expand Down
4 changes: 2 additions & 2 deletions python/pylibraft/pylibraft/distance/pairwise_distance.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cdef extern from "raft_distance/pairwise_distance.hpp" \
int k,
DistanceType metric,
bool isRowMajor,
float metric_arg)
float metric_arg) except +

cdef void pairwise_distance(const handle_t &handle,
double *x,
Expand All @@ -60,7 +60,7 @@ cdef extern from "raft_distance/pairwise_distance.hpp" \
int k,
DistanceType metric,
bool isRowMajor,
float metric_arg)
float metric_arg) except +

DISTANCE_TYPES = {
"l2": DistanceType.L2SqrtUnexpanded,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cdef extern from "raft_distance/random/rmat_rectangular_generator.hpp" \
int r_scale,
int c_scale,
int n_edges,
RngState& r)
RngState& r) except +

cdef void rmat_rectangular_gen(const handle_t &handle,
int64_t* out,
Expand All @@ -51,7 +51,7 @@ cdef extern from "raft_distance/random/rmat_rectangular_generator.hpp" \
int64_t r_scale,
int64_t c_scale,
int64_t n_edges,
RngState& r)
RngState& r) except +

cdef void rmat_rectangular_gen(const handle_t &handle,
int* out,
Expand All @@ -61,7 +61,7 @@ cdef extern from "raft_distance/random/rmat_rectangular_generator.hpp" \
int r_scale,
int c_scale,
int n_edges,
RngState& r)
RngState& r) except +

cdef void rmat_rectangular_gen(const handle_t &handle,
int64_t* out,
Expand All @@ -71,7 +71,7 @@ cdef extern from "raft_distance/random/rmat_rectangular_generator.hpp" \
int64_t r_scale,
int64_t c_scale,
int64_t n_edges,
RngState& r)
RngState& r) except +


@auto_sync_handle
Expand Down