19 #include <cudf/detail/iterator.cuh>
22 #include <thrust/iterator/constant_iterator.h>
23 #include <thrust/iterator/transform_iterator.h>
51 template <
typename Iter>
52 [[maybe_unused]]
static auto nulls_at(Iter index_start, Iter index_end)
54 using index_type =
typename std::iterator_traits<Iter>::value_type;
56 return cudf::detail::make_counting_transform_iterator(
57 0, [indices = std::vector<index_type>{index_start, index_end}](
auto i) {
58 return std::find(indices.cbegin(), indices.cend(), i) == indices.cend();
79 [[maybe_unused]]
static auto nulls_at(std::vector<cudf::size_type>
const& indices)
81 return nulls_at(indices.cbegin(), indices.cend());
101 return nulls_at(std::vector<cudf::size_type>{index});
109 [[maybe_unused]]
static auto all_nulls() {
return thrust::make_constant_iterator(
false); }
116 [[maybe_unused]]
static auto no_nulls() {
return thrust::make_constant_iterator(
true); }
132 [[maybe_unused]]
static auto nulls_from_nullptrs(std::vector<T const*>
const& ptrs)
134 return thrust::make_transform_iterator(ptrs.begin(), [](
auto ptr) { return ptr != nullptr; });
std::unique_ptr< column > find(strings_column_view const &input, string_scalar const &target, size_type start=0, size_type stop=-1, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Returns a column of character position values where the target string is first found in each string o...
int32_t size_type
Row index type for columns and tables.
Type declarations for libcudf.