Skip to content

Commit

Permalink
Use column_views instead of column_device_views in binary operations. (
Browse files Browse the repository at this point in the history
…#10780)

This PR changes the internal APIs used for binary operations to use `column_view` objects instead of `column_device_view` objects. This change is needed for the eventual support of structs in binary operations. See also: PR #9452.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Ryan Lee (https://github.com/rwlee)
  - Nghia Truong (https://github.com/ttnghia)
  - Jake Hemstad (https://github.com/jrhemstad)

URL: #10780
  • Loading branch information
bdice authored May 4, 2022
1 parent d3a39b3 commit 0d11591
Show file tree
Hide file tree
Showing 33 changed files with 190 additions and 194 deletions.
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/ATan2.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::ATan2>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::ATan2>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/Add.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::Add>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::Add>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/BitwiseAnd.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::BitwiseAnd>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::BitwiseAnd>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/BitwiseOr.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::BitwiseOr>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::BitwiseOr>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/BitwiseXor.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::BitwiseXor>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::BitwiseXor>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/Div.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::Div>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::Div>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/FloorDiv.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::FloorDiv>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::FloorDiv>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/Greater.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::Greater>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::Greater>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/GreaterEqual.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::GreaterEqual>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::GreaterEqual>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/Less.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::Less>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::Less>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/LessEqual.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::LessEqual>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::LessEqual>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/LogBase.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::LogBase>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::LogBase>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/LogicalAnd.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::LogicalAnd>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::LogicalAnd>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/LogicalOr.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::LogicalOr>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::LogicalOr>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/Mod.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::Mod>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::Mod>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/Mul.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::Mul>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::Mul>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/NullEquals.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::NullEquals>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::NullEquals>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/binaryop/compiled/NullLogicalAnd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::NullLogicalAnd>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::NullLogicalAnd>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/binaryop/compiled/NullLogicalOr.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::NullLogicalOr>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::NullLogicalOr>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/binaryop/compiled/NullMax.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@
#include "binary_ops.cuh"

namespace cudf::binops::compiled {
template void apply_binary_op<ops::NullMax>(mutable_column_device_view&,
column_device_view const&,
column_device_view const&,
template void apply_binary_op<ops::NullMax>(mutable_column_view&,
column_view const&,
column_view const&,
bool is_lhs_scalar,
bool is_rhs_scalar,
rmm::cuda_stream_view);
Expand Down
Loading

0 comments on commit 0d11591

Please sign in to comment.