catch C++ exceptions from Thrust
@@ -26,7 +26,7 @@ cdef extern from "../cuda/cupy_thrust.h" namespace "cupy::thrust":
###############################################################################
cpdef sort(dtype, size_t data_start, size_t keys_start,
- vector.vector[ptrdiff_t]& shape):
+ vector.vector[ptrdiff_t]& shape) except +:
cdef void *_data_start
cdef size_t *_keys_start
@@ -62,7 +62,8 @@ cpdef sort(dtype, size_t data_start, size_t keys_start,
'supported'.format(dtype))
-cpdef lexsort(dtype, size_t idx_start, size_t keys_start, size_t k, size_t n):
+cpdef lexsort(
+ dtype, size_t idx_start, size_t keys_start, size_t k, size_t n) except +:
cdef size_t _strm
@@ -97,7 +98,7 @@ cpdef lexsort(dtype, size_t idx_start, size_t keys_start, size_t k, size_t n):
cpdef argsort(dtype, size_t idx_start, size_t data_start, size_t keys_start,
- vector.vector[ptrdiff_t]& shape):
+ vector.vector[ptrdiff_t]& shape) except +:
cdef size_t *_idx_start
cdef size_t *_keys_start
cdef void *_data_start
