|
__device__ int | kat::c_std_lib::strcmp (const char *lhs, const char *rhs) |
| Lexicographically compares two nul-terminated strings. More...
|
|
__device__ int | kat::c_std_lib::strncmp (const char *lhs, const char *rhs, size_t n) |
| Lexicographically compares two nul-terminated strings - but no farther than their n'th character. More...
|
|
__device__ int | kat::c_std_lib::memcmp (const void *lhs, const void *rhs, size_t n) |
| Lexicographically compare two equal-length sequences of bytes. More...
|
|
__device__ char * | kat::c_std_lib::strcpy (char *dst, const char *src) |
| Copy a nul-terminated string from one location to another. More...
|
|
__device__ char * | kat::c_std_lib::strncpy (char *dst, const char *src, size_t n) |
| Copy a nul-terminated string from one location to another - but always write no more and no less than a fixed number of characters. More...
|
|
__device__ std::size_t | kat::c_std_lib::strlen (const char *s) |
| determines the length of a nul-terminated string More...
|
|
__device__ char * | kat::c_std_lib::strcat (char *dest, const char *src) |
| concatenates one string after another, in-place. More...
|
|
__device__ char * | kat::c_std_lib::strncat (char *dest, const char *src, size_t n) |
| concatenates one string after another, in-place - but appending no more than a fixed number of characters to the string at the destination. More...
|
|
__device__ void * | kat::c_std_lib::memcpy (void *__restrict__ destination, const void *__restrict__ source, size_t size) |
| copies a stretch of memory from one location to another More...
|
|
__device__ void * | kat::c_std_lib::memset (void *destination, int c, size_t size) |
| set a sequence of bytes in memory to a fixed value More...
|
|
__device__ void * | kat::c_std_lib::memchr (const void *s, int c, size_t n) |
| locate a byte with a specified value in a sequence of bytes in memory. More...
|
|
__device__ char * | kat::c_std_lib::strchr (const char *s, int c) |
| Search for a character within a nul-terminated string. More...
|
|
__device__ char * | kat::c_std_lib::strrchr (const char *s, int c) |
| same as std::strchr , except that the search begins at the end of the string More...
|
|
__device__ char * | kat::c_std_lib::strpbrk (const char *s, const char *accept) |
|
__device__ size_t | kat::c_std_lib::strspn (const char *s, const char *accept) |
|
__device__ size_t | kat::c_std_lib::strcspn (const char *s, const char *reject) |
|
__device__ char * | kat::c_std_lib::strstr (const char *haystack, const char *needle) |
|
__device__ char * | kat::c_std_lib::strrstr (const char *haystack, const char *needle) |
|
CUDA device-side versions of the C standard library string operations.
- Note
- The implementations are not intended to be particularly speedy - merely functional. In particular - you are advised to only use this when each thread is working on its own string.
-
unimplemented functions: strcoll, strxfrm (these require a locale); strerror (errno errors are not generated by device-side code); strtok (not reentrant)
-
The implementations are not actually C functions; I've put them in C++ namespaces. This choice could be changed if users demand it.