19 #include <cudf/detail/iterator.cuh>
21 #include <cudf/utilities/export.hpp>
23 #include <thrust/iterator/constant_iterator.h>
24 #include <thrust/iterator/transform_iterator.h>
28 namespace CUDF_EXPORT
cudf {
52 template <
typename Iter>
53 [[maybe_unused]]
static auto nulls_at(Iter index_start, Iter index_end)
55 using index_type =
typename std::iterator_traits<Iter>::value_type;
57 return cudf::detail::make_counting_transform_iterator(
58 0, [indices = std::vector<index_type>{index_start, index_end}](
auto i) {
59 return std::find(indices.cbegin(), indices.cend(), i) == indices.cend();
80 [[maybe_unused]]
static auto nulls_at(std::vector<cudf::size_type>
const& indices)
82 return nulls_at(indices.cbegin(), indices.cend());
102 return nulls_at(std::vector<cudf::size_type>{index});
110 [[maybe_unused]]
static auto all_nulls() {
return thrust::make_constant_iterator(
false); }
117 [[maybe_unused]]
static auto no_nulls() {
return thrust::make_constant_iterator(
true); }
133 [[maybe_unused]]
static auto nulls_from_nullptrs(std::vector<T const*>
const& ptrs)
135 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::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
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.