-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate column factories to pylibcudf (#15257)
This PR implements `column_factories.hpp` using `pylibcudf` and migrates the cuDF cython to use them cc @vyasr Authors: - https://github.com/brandon-b-miller - Lawrence Mitchell (https://github.com/wence-) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Lawrence Mitchell (https://github.com/wence-) URL: #15257
- Loading branch information
1 parent
382de32
commit eb46016
Showing
17 changed files
with
767 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
docs/cudf/source/user_guide/api_docs/pylibcudf/column_factories.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
================ | ||
column_factories | ||
================ | ||
|
||
.. automodule:: cudf._lib.pylibcudf.column_factories | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
from libcpp.memory cimport unique_ptr | ||
from libcpp.utility cimport move | ||
|
||
from cudf._lib.pylibcudf.libcudf.types cimport mask_state, size_type | ||
|
||
from .column cimport Column | ||
from .types cimport DataType, size_type, type_id | ||
|
||
ctypedef fused MakeEmptyColumnOperand: | ||
DataType | ||
type_id | ||
object | ||
|
||
ctypedef fused MaskArg: | ||
mask_state | ||
object | ||
|
||
|
||
cpdef Column make_empty_column( | ||
MakeEmptyColumnOperand type_or_id | ||
) | ||
|
||
cpdef Column make_numeric_column( | ||
DataType type_, | ||
size_type size, | ||
MaskArg mask, | ||
) | ||
|
||
cpdef Column make_fixed_point_column( | ||
DataType type_, | ||
size_type size, | ||
MaskArg mask, | ||
) | ||
|
||
cpdef Column make_timestamp_column( | ||
DataType type_, | ||
size_type size, | ||
MaskArg mask, | ||
) | ||
|
||
cpdef Column make_duration_column( | ||
DataType type_, | ||
size_type size, | ||
MaskArg mask, | ||
) | ||
|
||
cpdef Column make_fixed_width_column( | ||
DataType type_, | ||
size_type size, | ||
MaskArg mask, | ||
) |
Oops, something went wrong.