Skip to content

Commit

Permalink
use libcudf_exception_handler throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Oct 17, 2024
1 parent 4dbb8a3 commit 90ee965
Show file tree
Hide file tree
Showing 112 changed files with 1,039 additions and 927 deletions.
49 changes: 25 additions & 24 deletions python/pylibcudf/pylibcudf/libcudf/aggregation.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
from pylibcudf.exception_handler import libcudf_exception_handler
from libc.stddef cimport size_t
from libc.stdint cimport int32_t
from libcpp cimport bool
Expand Down Expand Up @@ -94,71 +95,71 @@ cdef extern from "cudf/aggregation.hpp" namespace "cudf" nogil:
ZERO_NORMALIZED
ONE_NORMALIZED

cdef unique_ptr[T] make_sum_aggregation[T]() except +
cdef unique_ptr[T] make_sum_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_product_aggregation[T]() except +
cdef unique_ptr[T] make_product_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_min_aggregation[T]() except +
cdef unique_ptr[T] make_min_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_max_aggregation[T]() except +
cdef unique_ptr[T] make_max_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_count_aggregation[T](null_policy) except +
cdef unique_ptr[T] make_count_aggregation[T](null_policy) except +libcudf_exception_handler

cdef unique_ptr[T] make_any_aggregation[T]() except +
cdef unique_ptr[T] make_any_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_all_aggregation[T]() except +
cdef unique_ptr[T] make_all_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_sum_of_squares_aggregation[T]() except +
cdef unique_ptr[T] make_sum_of_squares_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_mean_aggregation[T]() except +
cdef unique_ptr[T] make_mean_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_variance_aggregation[T](
size_type ddof) except +
size_type ddof) except +libcudf_exception_handler

cdef unique_ptr[T] make_std_aggregation[T](size_type ddof) except +
cdef unique_ptr[T] make_std_aggregation[T](size_type ddof) except +libcudf_exception_handler

cdef unique_ptr[T] make_median_aggregation[T]() except +
cdef unique_ptr[T] make_median_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_quantile_aggregation[T](
vector[double] q, interpolation i) except +
vector[double] q, interpolation i) except +libcudf_exception_handler

cdef unique_ptr[T] make_argmax_aggregation[T]() except +
cdef unique_ptr[T] make_argmax_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_argmin_aggregation[T]() except +
cdef unique_ptr[T] make_argmin_aggregation[T]() except +libcudf_exception_handler

cdef unique_ptr[T] make_nunique_aggregation[T](null_policy null_handling) except +
cdef unique_ptr[T] make_nunique_aggregation[T](null_policy null_handling) except +libcudf_exception_handler

cdef unique_ptr[T] make_nth_element_aggregation[T](
size_type n,
null_policy null_handling
) except +
) except +libcudf_exception_handler

cdef unique_ptr[T] make_collect_list_aggregation[T](
null_policy null_handling
) except +
) except +libcudf_exception_handler

cdef unique_ptr[T] make_collect_set_aggregation[T](
null_policy null_handling, null_equality nulls_equal, nan_equality nans_equal
) except +
) except +libcudf_exception_handler

cdef unique_ptr[T] make_udf_aggregation[T](
udf_type type,
string user_defined_aggregator,
data_type output_type) except +
data_type output_type) except +libcudf_exception_handler

cdef unique_ptr[T] make_ewma_aggregation[T](
double com, ewm_history adjust
) except +
) except +libcudf_exception_handler

cdef unique_ptr[T] make_correlation_aggregation[T](
correlation_type type, size_type min_periods) except +
correlation_type type, size_type min_periods) except +libcudf_exception_handler

cdef unique_ptr[T] make_covariance_aggregation[T](
size_type min_periods, size_type ddof) except +
size_type min_periods, size_type ddof) except +libcudf_exception_handler

cdef unique_ptr[T] make_rank_aggregation[T](
rank_method method,
order column_order,
null_policy null_handling,
null_order null_precedence,
rank_percentage percentage) except +
rank_percentage percentage) except +libcudf_exception_handler
1 change: 1 addition & 0 deletions python/pylibcudf/pylibcudf/libcudf/binaryop.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
from pylibcudf.exception_handler import libcudf_exception_handler

from libc.stdint cimport int32_t
from libcpp cimport bool
Expand Down
21 changes: 11 additions & 10 deletions python/pylibcudf/pylibcudf/libcudf/column/column.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
from pylibcudf.exception_handler import libcudf_exception_handler

from libcpp cimport bool
from libcpp.memory cimport unique_ptr
Expand All @@ -19,15 +20,15 @@ cdef extern from "cudf/column/column.hpp" namespace "cudf" nogil:
vector[unique_ptr[column]] children

cdef cppclass column:
column() except +
column(const column& other) except +
column() except +libcudf_exception_handler
column(const column& other) except +libcudf_exception_handler

column(column_view view) except +
column(column_view view) except +libcudf_exception_handler

size_type size() except +
size_type null_count() except +
bool has_nulls() except +
data_type type() except +
column_view view() except +
mutable_column_view mutable_view() except +
column_contents release() except +
size_type size() except +libcudf_exception_handler
size_type null_count() except +libcudf_exception_handler
bool has_nulls() except +libcudf_exception_handler
data_type type() except +libcudf_exception_handler
column_view view() except +libcudf_exception_handler
mutable_column_view mutable_view() except +libcudf_exception_handler
column_contents release() except +libcudf_exception_handler
31 changes: 16 additions & 15 deletions python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
from pylibcudf.exception_handler import libcudf_exception_handler

from libcpp.memory cimport unique_ptr
from pylibcudf.libcudf.column.column cimport column
Expand All @@ -17,66 +18,66 @@ from rmm.librmm.device_buffer cimport device_buffer
cdef extern from "cudf/column/column_factories.hpp" namespace "cudf" nogil:
cdef unique_ptr[column] make_numeric_column(data_type type,
size_type size,
mask_state state) except +
mask_state state) except +libcudf_exception_handler

cdef unique_ptr[column] make_numeric_column(data_type type,
size_type size,
device_buffer mask,
size_type null_count) except +
size_type null_count) except +libcudf_exception_handler

cdef unique_ptr[column] make_fixed_point_column(
data_type type,
size_type size,
mask_state state) except +
mask_state state) except +libcudf_exception_handler

cdef unique_ptr[column] make_fixed_point_column(
data_type type,
size_type size,
device_buffer mask,
size_type null_count) except +
size_type null_count) except +libcudf_exception_handler

cdef unique_ptr[column] make_timestamp_column(
data_type type,
size_type size,
mask_state state) except +
mask_state state) except +libcudf_exception_handler

cdef unique_ptr[column] make_timestamp_column(
data_type type,
size_type size,
device_buffer mask,
size_type null_count) except +
size_type null_count) except +libcudf_exception_handler

cdef unique_ptr[column] make_duration_column(
data_type type,
size_type size,
mask_state state) except +
mask_state state) except +libcudf_exception_handler

cdef unique_ptr[column] make_duration_column(
data_type type,
size_type size,
device_buffer mask,
size_type null_count) except +
size_type null_count) except +libcudf_exception_handler

cdef unique_ptr[column] make_fixed_width_column(
data_type type,
size_type size,
mask_state state) except +
mask_state state) except +libcudf_exception_handler

cdef unique_ptr[column] make_fixed_width_column(
data_type type,
size_type size,
device_buffer mask,
size_type null_count) except +
size_type null_count) except +libcudf_exception_handler

cdef unique_ptr[column] make_column_from_scalar(const scalar& s,
size_type size) except +
size_type size) except +libcudf_exception_handler

cdef unique_ptr[column] make_dictionary_from_scalar(const scalar& s,
size_type size) except +
size_type size) except +libcudf_exception_handler

cdef unique_ptr[column] make_empty_column(type_id id) except +
cdef unique_ptr[column] make_empty_column(data_type type_) except +
cdef unique_ptr[column] make_empty_column(type_id id) except +libcudf_exception_handler
cdef unique_ptr[column] make_empty_column(data_type type_) except +libcudf_exception_handler

cdef unique_ptr[column] make_dictionary_column(
unique_ptr[column] keys_column,
unique_ptr[column] indices_column) except +
unique_ptr[column] indices_column) except +libcudf_exception_handler
81 changes: 41 additions & 40 deletions python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
from pylibcudf.exception_handler import libcudf_exception_handler

from libcpp cimport bool
from libcpp.vector cimport vector
Expand All @@ -7,31 +8,31 @@ from pylibcudf.libcudf.types cimport bitmask_type, data_type, size_type

cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil:
cdef cppclass column_view:
column_view() except +
column_view(const column_view& other) except +
column_view() except +libcudf_exception_handler
column_view(const column_view& other) except +libcudf_exception_handler

column_view& operator=(const column_view&) except +
column_view& operator=(const column_view&) except +libcudf_exception_handler

column_view(
data_type type,
size_type size,
const void* data
) except +
) except +libcudf_exception_handler

column_view(
data_type type,
size_type size,
const void* data,
const bitmask_type* null_mask
) except +
) except +libcudf_exception_handler

column_view(
data_type type,
size_type size,
const void* data,
const bitmask_type* null_mask,
size_type null_count
) except +
) except +libcudf_exception_handler

column_view(
data_type type,
Expand All @@ -40,7 +41,7 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil:
const bitmask_type* null_mask,
size_type null_count,
size_type offset
) except +
) except +libcudf_exception_handler

column_view(
data_type type,
Expand All @@ -50,45 +51,45 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil:
size_type null_count,
size_type offset,
vector[column_view] children
) except +

const T* data[T]() except +
const T* head[T]() except +
const bitmask_type* null_mask() except +
size_type size() except +
data_type type() except +
bool nullable() except +
size_type null_count() except +
bool has_nulls() except +
size_type offset() except +
size_type num_children() except +
column_view child(size_type) except +
) except +libcudf_exception_handler

const T* data[T]() except +libcudf_exception_handler
const T* head[T]() except +libcudf_exception_handler
const bitmask_type* null_mask() except +libcudf_exception_handler
size_type size() except +libcudf_exception_handler
data_type type() except +libcudf_exception_handler
bool nullable() except +libcudf_exception_handler
size_type null_count() except +libcudf_exception_handler
bool has_nulls() except +libcudf_exception_handler
size_type offset() except +libcudf_exception_handler
size_type num_children() except +libcudf_exception_handler
column_view child(size_type) except +libcudf_exception_handler

cdef cppclass mutable_column_view:
mutable_column_view() except +
mutable_column_view(const mutable_column_view&) except +
mutable_column_view& operator=(const mutable_column_view&) except +
mutable_column_view() except +libcudf_exception_handler
mutable_column_view(const mutable_column_view&) except +libcudf_exception_handler
mutable_column_view& operator=(const mutable_column_view&) except +libcudf_exception_handler

mutable_column_view(
data_type type,
size_type size,
const void* data
) except +
) except +libcudf_exception_handler

mutable_column_view(
data_type type,
size_type size,
const void* data,
const bitmask_type* null_mask
) except +
) except +libcudf_exception_handler

mutable_column_view(
data_type type,
size_type size,
const void* data,
const bitmask_type* null_mask,
size_type null_count
) except +
) except +libcudf_exception_handler

mutable_column_view(
data_type type,
Expand All @@ -97,22 +98,22 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil:
const bitmask_type* null_mask,
size_type null_count,
size_type offset
) except +
) except +libcudf_exception_handler

mutable_column_view(
data_type type, size_type size, const void* data,
const bitmask_type* null_mask, size_type null_count,
size_type offset, vector[mutable_column_view] children
) except +

T* data[T]() except +
T* head[T]() except +
bitmask_type* null_mask() except +
size_type size() except +
data_type type() except +
bool nullable() except +
size_type null_count() except +
bool has_nulls() except +
size_type offset() except +
size_type num_children() except +
mutable_column_view& child(size_type) except +
) except +libcudf_exception_handler

T* data[T]() except +libcudf_exception_handler
T* head[T]() except +libcudf_exception_handler
bitmask_type* null_mask() except +libcudf_exception_handler
size_type size() except +libcudf_exception_handler
data_type type() except +libcudf_exception_handler
bool nullable() except +libcudf_exception_handler
size_type null_count() except +libcudf_exception_handler
bool has_nulls() except +libcudf_exception_handler
size_type offset() except +libcudf_exception_handler
size_type num_children() except +libcudf_exception_handler
mutable_column_view& child(size_type) except +libcudf_exception_handler
7 changes: 4 additions & 3 deletions python/pylibcudf/pylibcudf/libcudf/concatenate.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
from pylibcudf.exception_handler import libcudf_exception_handler

from libcpp.memory cimport unique_ptr
from libcpp.vector cimport vector
Expand All @@ -15,7 +16,7 @@ cdef extern from "cudf/concatenate.hpp" namespace "cudf" nogil:
# constructable from a vector. In case they are needed in the future,
# host_span versions can be added, e.g:
#
# cdef unique_ptr[column] concatenate(host_span[column_view] columns) except +
# cdef unique_ptr[column] concatenate(host_span[column_view] columns) except +libcudf_exception_handler

cdef unique_ptr[column] concatenate(const vector[column_view] columns) except +
cdef unique_ptr[table] concatenate(const vector[table_view] tables) except +
cdef unique_ptr[column] concatenate(const vector[column_view] columns) except +libcudf_exception_handler
cdef unique_ptr[table] concatenate(const vector[table_view] tables) except +libcudf_exception_handler
Loading

0 comments on commit 90ee965

Please sign in to comment.