xref: /llvm-project/libc/docs/gpu/support.rst (revision fe6a3d46aa658fdd1e9a6cbb2031a597a3e59536)
1.. _libc_gpu_support:
2
3===================
4Supported Functions
5===================
6
7.. include:: ../check.rst
8
9.. contents:: Table of Contents
10  :depth: 4
11  :local:
12
13The following functions and headers are supported at least partially on the
14device. Some functions are implemented fully on the GPU, while others require a
15`remote procedure call <libc_gpu_rpc>`_.
16
17ctype.h
18-------
19
20=============  =========  ============
21Function Name  Available  RPC Required
22=============  =========  ============
23isalnum        |check|
24isalpha        |check|
25isascii        |check|
26isblank        |check|
27iscntrl        |check|
28isdigit        |check|
29isgraph        |check|
30islower        |check|
31isprint        |check|
32ispunct        |check|
33isspace        |check|
34isupper        |check|
35isxdigit       |check|
36toascii        |check|
37tolower        |check|
38toupper        |check|
39=============  =========  ============
40
41string.h
42--------
43
44=============  =========  ============
45Function Name  Available  RPC Required
46=============  =========  ============
47bcmp           |check|
48bcopy          |check|
49bzero          |check|
50memccpy        |check|
51memchr         |check|
52memcmp         |check|
53memcpy         |check|
54memmem         |check|
55memmove        |check|
56mempcpy        |check|
57memrchr        |check|
58memset         |check|
59stpcpy         |check|
60stpncpy        |check|
61strcat         |check|
62strchr         |check|
63strchrnul      |check|
64strcmp         |check|
65strcoll        |check|
66strcpy         |check|
67strcspn        |check|
68strdup         |check|
69strerror       |check|
70strlcat        |check|
71strlcpy        |check|
72strlen         |check|
73strncat        |check|
74strncmp        |check|
75strncpy        |check|
76strndup        |check|
77strnlen        |check|
78strpbrk        |check|
79strrchr        |check|
80strsep         |check|
81strspn         |check|
82strstr         |check|
83strtok         |check|
84strtok_r       |check|
85strxfrm        |check|
86=============  =========  ============
87
88strings.h
89---------
90
91=============  =========  ============
92Function Name  Available  RPC Required
93=============  =========  ============
94bcmp           |check|
95bcopy          |check|
96bzero          |check|
97strcasecmp     |check|
98strcasestr     |check|
99index          |check|
100rindex         |check|
101=============  =========  ============
102
103stdbit.h
104--------
105
106============================  =========  ============
107Function Name                 Available  RPC Required
108============================  =========  ============
109stdc_leading_zeros_uc         |check|
110stdc_leading_zeros_us         |check|
111stdc_leading_zeros_ui         |check|
112stdc_leading_zeros_ul         |check|
113stdc_leading_zeros_ull        |check|
114stdc_trailing_zeros_uc        |check|
115stdc_trailing_zeros_us        |check|
116stdc_trailing_zeros_ui        |check|
117stdc_trailing_zeros_ul        |check|
118stdc_trailing_zeros_ull       |check|
119stdc_trailing_ones_uc         |check|
120stdc_trailing_ones_us         |check|
121stdc_trailing_ones_ui         |check|
122stdc_trailing_ones_ul         |check|
123stdc_trailing_ones_ull        |check|
124stdc_first_leading_zero_uc    |check|
125stdc_first_leading_zero_us    |check|
126stdc_first_leading_zero_ui    |check|
127stdc_first_leading_zero_ul    |check|
128stdc_first_leading_zero_ull   |check|
129stdc_first_leading_one_uc     |check|
130stdc_first_leading_one_us     |check|
131stdc_first_leading_one_ui     |check|
132stdc_first_leading_one_ul     |check|
133stdc_first_leading_one_ull    |check|
134stdc_first_trailing_zero_uc   |check|
135stdc_first_trailing_zero_us   |check|
136stdc_first_trailing_zero_ui   |check|
137stdc_first_trailing_zero_ul   |check|
138stdc_first_trailing_zero_ull  |check|
139stdc_first_trailing_one_uc    |check|
140stdc_first_trailing_one_us    |check|
141stdc_first_trailing_one_ui    |check|
142stdc_first_trailing_one_ul    |check|
143stdc_first_trailing_one_ull   |check|
144stdc_count_zeros_uc           |check|
145stdc_count_zeros_us           |check|
146stdc_count_zeros_ui           |check|
147stdc_count_zeros_ul           |check|
148stdc_count_zeros_ull          |check|
149stdc_count_ones_uc            |check|
150stdc_count_ones_us            |check|
151stdc_count_ones_ui            |check|
152stdc_count_ones_ul            |check|
153stdc_count_ones_ull           |check|
154stdc_has_single_bit_uc        |check|
155stdc_has_single_bit_us        |check|
156stdc_has_single_bit_ui        |check|
157stdc_has_single_bit_ul        |check|
158stdc_has_single_bit_ull       |check|
159stdc_bit_width_uc             |check|
160stdc_bit_width_us             |check|
161stdc_bit_width_ui             |check|
162stdc_bit_width_ul             |check|
163stdc_bit_width_ull            |check|
164stdc_bit_floor_uc             |check|
165stdc_bit_floor_us             |check|
166stdc_bit_floor_ui             |check|
167stdc_bit_floor_ul             |check|
168stdc_bit_floor_ull            |check|
169stdc_bit_ceil_uc              |check|
170stdc_bit_ceil_us              |check|
171stdc_bit_ceil_ui              |check|
172stdc_bit_ceil_ul              |check|
173stdc_bit_ceil_ull             |check|
174============================  =========  ============
175
176stdlib.h
177--------
178
179=============  =========  ============
180Function Name  Available  RPC Required
181=============  =========  ============
182abs            |check|
183atoi           |check|
184atof           |check|
185atol           |check|
186atoll          |check|
187exit           |check|    |check|
188abort          |check|    |check|
189system         |check|    |check|
190labs           |check|
191llabs          |check|
192div            |check|
193ldiv           |check|
194lldiv          |check|
195bsearch        |check|
196qsort          |check|
197qsort_r        |check|
198strtod         |check|
199strtof         |check|
200strtol         |check|
201strtold        |check|
202strtoll        |check|
203strtoul        |check|
204strtoull       |check|
205srand          |check|
206rand           |check|
207=============  =========  ============
208
209inttypes.h
210----------
211
212=============  =========  ============
213Function Name  Available  RPC Required
214=============  =========  ============
215imaxabs        |check|
216imaxdiv        |check|
217strtoimax      |check|
218strtoumax      |check|
219=============  =========  ============
220
221stdio.h
222-------
223
224=============  =========  ============
225Function Name  Available  RPC Required
226=============  =========  ============
227feof           |check|    |check|
228ferror         |check|    |check|
229clearerr       |check|    |check|
230fseek          |check|    |check|
231ftell          |check|    |check|
232fflush         |check|    |check|
233fgetc          |check|    |check|
234fgets          |check|    |check|
235ungetc         |check|    |check|
236getc           |check|    |check|
237getchar        |check|    |check|
238puts           |check|    |check|
239fputs          |check|    |check|
240fputc          |check|    |check|
241fwrite         |check|    |check|
242remove         |check|    |check|
243rename         |check|    |check|
244putc           |check|    |check|
245printf         |check|    |check|
246vprintf        |check|    |check|
247fprintf        |check|    |check|
248vfprintf       |check|    |check|
249sprintf        |check|
250snprintf       |check|
251vsprintf       |check|
252vsnprintf      |check|
253sscanf         |check|
254scanf          |check|    |check|
255fscanf         |check|    |check|
256putchar        |check|    |check|
257fclose         |check|    |check|
258fopen          |check|    |check|
259fread          |check|    |check|
260=============  =========  ============
261
262time.h
263------
264
265=============  =========  ============
266Function Name  Available  RPC Required
267=============  =========  ============
268clock          |check|
269clock_gettime  |check|
270nanosleep      |check|
271=============  =========  ============
272
273assert.h
274--------
275
276=============  =========  ============
277Function Name  Available  RPC Required
278=============  =========  ============
279assert         |check|    |check|
280__assert_fail  |check|    |check|
281=============  =========  ============
282