Skip to content

Commit

Permalink
Remove push_back API
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
  • Loading branch information
ttnghia committed Mar 8, 2024
1 parent 4e3829d commit eac0d51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
11 changes: 5 additions & 6 deletions cpp/src/io/orc/reader_impl_preprocess.cu
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,11 @@ rmm::device_buffer decompress_stripe_data(
rmm::cuda_stream_view stream)
{
// Parse the columns' compressed info
cudf::detail::hostdevice_vector<gpu::CompressedStreamInfo> compinfo(
0, stream_info.size(), stream);
for (auto const& info : stream_info) {
compinfo.push_back(gpu::CompressedStreamInfo(
static_cast<uint8_t const*>(stripe_data[info.stripe_idx].data()) + info.dst_pos,
info.length));
cudf::detail::hostdevice_vector<gpu::CompressedStreamInfo> compinfo(stream_info.size(), stream);
for (std::size_t idx = 0; idx < stream_info.size(); ++idx) {
auto const& info = stream_info[idx];
compinfo[idx] = gpu::CompressedStreamInfo(
static_cast<uint8_t const*>(stripe_data[info.stripe_idx].data()) + info.dst_pos, info.length);
}
compinfo.host_to_device_async(stream);

Expand Down
7 changes: 0 additions & 7 deletions cpp/src/io/utilities/hostdevice_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ class hostdevice_vector {
d_data.resize(max_size, stream);
}

void push_back(T const& data)
{
CUDF_EXPECTS(size() < capacity(),
"Cannot insert data into hostdevice_vector because capacity has been exceeded.");
h_data.push_back(data);
}

[[nodiscard]] size_t capacity() const noexcept { return d_data.size(); }
[[nodiscard]] size_t size() const noexcept { return h_data.size(); }
[[nodiscard]] size_t size_bytes() const noexcept { return sizeof(T) * size(); }
Expand Down

0 comments on commit eac0d51

Please sign in to comment.