20 #include <cuda_runtime.h>
78 using difference_type = ptrdiff_t;
82 using iterator_category = std::input_iterator_tag;
104 [[nodiscard]] __device__
inline size_type position()
const;
344 : _data(
data), _bytes(bytes), _length(UNKNOWN_STRING_LENGTH)
402 template <
bool forward>
403 __device__
inline size_type find_impl(
char const* str,
Handy iterator for navigating through encoded characters.
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8...
CUDF_HOST_DEVICE size_type size_bytes() const
Return the number of bytes in this string.
size_type rfind(string_view const &str, size_type pos=0, size_type count=-1) const
Returns the character position of the last occurrence where the argument str is found in this string ...
string_view & operator=(string_view const &)=default
Copy assignment operator.
CUDF_HOST_DEVICE string_view()
Default constructor represents an empty string.
size_type length() const
Return the number of characters in this string.
string_view substr(size_type start, size_type length) const
Return a sub-string of this string. The original string and device memory must still be maintained fo...
CUDF_HOST_DEVICE bool empty() const
Return true if string has no characters.
bool operator==(string_view const &rhs) const
Returns true if rhs matches this string exactly.
string_view(string_view &&)=default
Move constructor.
const_iterator end() const
Return new iterator pointing past the end of this string.
CUDF_HOST_DEVICE string_view(char const *data, size_type bytes)
Create instance from existing device char array.
int compare(string_view const &str) const
Comparing target string with this string. Each character is compared as a UTF-8 code-point value.
bool operator>=(string_view const &rhs) const
Returns true if rhs matches or is ordered before this string.
string_view & operator=(string_view &&)=default
Move assignment operator.
CUDF_HOST_DEVICE char const * data() const
Return a pointer to the internal device array.
size_type byte_offset(size_type pos) const
Return the byte offset from data() for a given character position.
const_iterator begin() const
Return new iterator pointing to the beginning of this string.
char_utf8 operator[](size_type pos) const
Return single UTF-8 character at the given character position.
string_view(string_view const &)=default
Copy constructor.
bool operator!=(string_view const &rhs) const
Returns true if rhs does not match this string.
size_type find(string_view const &str, size_type pos=0, size_type count=-1) const
Returns the character position of the first occurrence where the argument str is found in this string...
static CUDF_HOST_DEVICE string_view max()
Return maximum value associated with the string type.
bool operator<=(string_view const &rhs) const
Returns true if this string matches or is ordered before rhs.
bool operator<(string_view const &rhs) const
Returns true if this string is ordered before rhs.
bool operator>(string_view const &rhs) const
Returns true if rhs is ordered before this string.
static cudf::size_type const npos
No-position value.
static CUDF_HOST_DEVICE string_view min()
Return minimum value associated with the string type.
CUDF_HOST_DEVICE fixed_point< Rep1, Rad1 > operator-(fixed_point< Rep1, Rad1 > const &lhs, fixed_point< Rep1, Rad1 > const &rhs)
CUDF_HOST_DEVICE fixed_point< Rep1, Rad1 > operator*(fixed_point< Rep1, Rad1 > const &lhs, fixed_point< Rep1, Rad1 > const &rhs)
CUDF_HOST_DEVICE fixed_point< Rep1, Rad1 > operator+(fixed_point< Rep1, Rad1 > const &lhs, fixed_point< Rep1, Rad1 > const &rhs)
int32_t size_type
Row index type for columns and tables.
uint32_t char_utf8
UTF-8 characters are 1-4 bytes.
Type declarations for libcudf.
#define CUDF_HOST_DEVICE
Indicates that the function or method is usable on host and device.