Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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