def binop(lhs, rhs, op, out_dtype): libcudf.nvtx.nvtx_range_push("CUDF_BINARY_OP", "orange") masked = lhs.nullable or rhs.nullable out = column.column_empty_like(lhs, dtype=out_dtype, masked=masked) _ = libcudf.binops.apply_op(lhs, rhs, out, op) libcudf.nvtx.nvtx_range_pop() return out
def binop(lhs, rhs, op, out_dtype): libcudf.nvtx.nvtx_range_push("CUDF_BINARY_OP", "orange") masked = lhs.has_null_mask or rhs.has_null_mask out = column.column_empty_like(lhs, dtype=out_dtype, masked=masked) null_count = libcudf.binops.apply_op(lhs, rhs, out, op) out = out.replace(null_count=null_count) libcudf.nvtx.nvtx_range_pop() return out
def _string_column_binop(lhs, rhs, op): nvtx_range_push("CUDF_BINARY_OP", "orange") # Allocate output masked = lhs.nullable or rhs.nullable out = column.column_empty_like(lhs, dtype="bool", masked=masked) # Call and fix null_count _ = libcudf.binops.apply_op(lhs=lhs, rhs=rhs, out=out, op=op) nvtx_range_pop() return out
def _string_column_binop(lhs, rhs, op): nvtx_range_push("CUDF_BINARY_OP", "orange") # Allocate output masked = lhs.has_null_mask or rhs.has_null_mask out = column.column_empty_like(lhs, dtype="bool", masked=masked) # Call and fix null_count null_count = libcudf.binops.apply_op(lhs=lhs, rhs=rhs, out=out, op=op) result = out.replace(null_count=null_count) nvtx_range_pop() return result