Skip to content

Commit

Permalink
from rmm._lib import Foo
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt711 committed Oct 4, 2024
1 parent 6882cda commit 88893b8
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions python/pylibcudf/pylibcudf/binaryop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,27 @@ cpdef Column binary_operation(

if LeftBinaryOperand is Column and RightBinaryOperand is Column:
with nogil:
result = move(
cpp_binaryop.binary_operation(
lhs.view(),
rhs.view(),
op,
output_type.c_obj
)
result = cpp_binaryop.binary_operation(
lhs.view(),
rhs.view(),
op,
output_type.c_obj
)
elif LeftBinaryOperand is Column and RightBinaryOperand is Scalar:
with nogil:
result = move(
cpp_binaryop.binary_operation(
lhs.view(),
dereference(rhs.c_obj),
op,
output_type.c_obj
)
result = cpp_binaryop.binary_operation(
lhs.view(),
dereference(rhs.c_obj),
op,
output_type.c_obj
)
elif LeftBinaryOperand is Scalar and RightBinaryOperand is Column:
with nogil:
result = move(
cpp_binaryop.binary_operation(
dereference(lhs.c_obj),
rhs.view(),
op,
output_type.c_obj
)
result = cpp_binaryop.binary_operation(
dereference(lhs.c_obj),
rhs.view(),
op,
output_type.c_obj
)
else:
raise ValueError(f"Invalid arguments {lhs} and {rhs}")
Expand Down

0 comments on commit 88893b8

Please sign in to comment.