9#ifndef __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
10#define __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
12#if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13#error "This file is for GPU offloading compilation only"
16#include_next <string.h>
18#if __has_include(<llvm-libc-decls/string.h>)
20#if defined(__HIP__) || defined(__CUDA__)
21#define __LIBC_ATTRS __attribute__((device))
24#pragma omp begin declare target
29#if defined(__cplusplus) && defined(__GLIBC__) && \
30 defined(__CORRECT_ISO_CPP_STRING_H_PROTO)
37void *memccpy(
void *__restrict,
const void *__restrict,
int,
39int memcmp(
const void *,
const void *,
size_t) __LIBC_ATTRS;
40void *
memcpy(
void *__restrict,
const void *__restrict,
size_t) __LIBC_ATTRS;
41void *memmem(
const void *,
size_t,
const void *,
size_t) __LIBC_ATTRS;
42void *memmove(
void *,
const void *,
size_t) __LIBC_ATTRS;
43void *mempcpy(
void *__restrict,
const void *__restrict,
size_t) __LIBC_ATTRS;
44void *
memset(
void *,
int,
size_t) __LIBC_ATTRS;
45char *stpcpy(
char *__restrict,
const char *__restrict) __LIBC_ATTRS;
46char *stpncpy(
char *__restrict,
const char *__restrict,
size_t) __LIBC_ATTRS;
47char *strcat(
char *__restrict,
const char *__restrict) __LIBC_ATTRS;
48int strcmp(
const char *,
const char *) __LIBC_ATTRS;
49int strcoll(
const char *,
const char *) __LIBC_ATTRS;
50char *strcpy(
char *__restrict,
const char *__restrict) __LIBC_ATTRS;
51size_t strcspn(
const char *,
const char *) __LIBC_ATTRS;
52char *strdup(
const char *) __LIBC_ATTRS;
53size_t strlen(
const char *) __LIBC_ATTRS;
54char *strncat(
char *__restrict,
const char *__restrict,
size_t) __LIBC_ATTRS;
55int strncmp(
const char *,
const char *,
size_t) __LIBC_ATTRS;
56char *strncpy(
char *__restrict,
const char *__restrict,
size_t) __LIBC_ATTRS;
57char *strndup(
const char *,
size_t) __LIBC_ATTRS;
58size_t strnlen(
const char *,
size_t) __LIBC_ATTRS;
59size_t strspn(
const char *,
const char *) __LIBC_ATTRS;
60char *strtok(
char *__restrict,
const char *__restrict) __LIBC_ATTRS;
61char *strtok_r(
char *__restrict,
const char *__restrict,
62 char **__restrict) __LIBC_ATTRS;
63size_t strxfrm(
char *__restrict,
const char *__restrict,
size_t) __LIBC_ATTRS;
67char *strstr(
char *,
const char *)
noexcept __LIBC_ATTRS;
68const char *strstr(
const char *,
const char *)
noexcept __LIBC_ATTRS;
69char *strpbrk(
char *,
const char *)
noexcept __LIBC_ATTRS;
70const char *strpbrk(
const char *,
const char *)
noexcept __LIBC_ATTRS;
71char *strrchr(
char *,
int)
noexcept __LIBC_ATTRS;
72const char *strrchr(
const char *,
int)
noexcept __LIBC_ATTRS;
73char *strchr(
char *,
int)
noexcept __LIBC_ATTRS;
74const char *strchr(
const char *,
int)
noexcept __LIBC_ATTRS;
75char *strchrnul(
char *,
int)
noexcept __LIBC_ATTRS;
76const char *strchrnul(
const char *,
int)
noexcept __LIBC_ATTRS;
77char *strcasestr(
char *,
const char *)
noexcept __LIBC_ATTRS;
78const char *strcasestr(
const char *,
const char *)
noexcept __LIBC_ATTRS;
79void *memrchr(
void *__s,
int __c,
size_t __n)
noexcept __LIBC_ATTRS;
80const void *memrchr(
const void *__s,
int __c,
size_t __n)
noexcept __LIBC_ATTRS;
81void *memchr(
void *__s,
int __c,
size_t __n)
noexcept __LIBC_ATTRS;
82const void *memchr(
const void *__s,
int __c,
size_t __n)
noexcept __LIBC_ATTRS;
86#include <llvm-libc-decls/string.h>
90#pragma omp end declare target
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
__DEVICE__ void * memset(void *__a, int __b, size_t __c)
static __inline__ vector float vector float vector float __c