mirror of
https://github.com/clang-retro/llvm.git
synced 2026-11-28 21:29:24 -08:00
This migrates the remaining llvm-libc doc files to markdown.
The main concern I have is that there are still 6 eval-rst blocks
wrapping grid-tables, and native markdown tables have no way to
represent the colspan and rowspan cells in those files. In the end, I
decided to send this off as is, since it should have no visible
difference, and we can eliminate eval-rst later.
Migration notes from the agent:
- Restored underscore anchor labels such as `libc_gpu_rpc` because
rst2myst turned them into hyphenated names that other pages still
reference.
- Replaced Markdown links to Sphinx labels with `{ref}` roles because
plain links did not resolve to the labelled pages.
- Converted the flat grid tables in `headers/math/index.md` and
`headers/complex.md` to pipe tables using the `{{ check }}` substitution
because `|check|` is not defined inside `{eval-rst}` blocks.
- Kept the grid tables with row or column spans in
`headers/math/index.md`, `headers/math/log.md`, and `headers/stdfix.md`
inside narrowly scoped `{eval-rst}` blocks because pipe tables and
list-tables cannot express spans. Replaced `|check|` in the `stdfix.md`
tables with the check mark character, which matches the rendered
substitution.
- Restored the 57 `.. math::` blocks in `headers/math/log.md` as
`{math}` fences and turned default-role math into `{math}` roles because
rst2myst collapsed the multi-line equations and `$$` is not enabled.
- Kept the unused `.. role:: green` and `<style>` block in
`headers/math/index.md` because they were present in the source and
removing them is outside the scope of a markup migration.
- Changed "step a and step c" to "items 1 and 3" in
`headers/math/log.md` because Markdown has no alphabetic list markers,
so the lettered steps became numbered.
- Accepted single-backtick default-role text rendering as inline code
instead of italics in `headers/stdfix.md`, and empty table body cells
rendering with slightly more height in `uefi/support.md`, because those
are standard MyST rendering differences (visual diff 0.39% and 0.76%).
- Accepted nested list items in the "Edge cases" list of
`headers/math/log.md` now rendering inside their list items because the
original reST indentation left them outside, contrary to the evident
intent (visual diff 0.85%).
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is a stacked PR based on #233687, which is a standalone commit that
renames *.rst -> *.md before this PR lands for history preservation
purposes.
This was prepared with rst2myst plus LLM-assisted cleanup.
11 KiB
11 KiB
(libc_gpu_support)=
Supported Functions
The following functions and headers are supported at least partially on the
device. Some functions are implemented fully on the GPU, while others require a
{ref}remote procedure call <libc_gpu_rpc>.
ctype.h
| Function Name | Available | RPC Required |
|---|---|---|
| isalnum | {{ check }} | |
| isalpha | {{ check }} | |
| isascii | {{ check }} | |
| isblank | {{ check }} | |
| iscntrl | {{ check }} | |
| isdigit | {{ check }} | |
| isgraph | {{ check }} | |
| islower | {{ check }} | |
| isprint | {{ check }} | |
| ispunct | {{ check }} | |
| isspace | {{ check }} | |
| isupper | {{ check }} | |
| isxdigit | {{ check }} | |
| toascii | {{ check }} | |
| tolower | {{ check }} | |
| toupper | {{ check }} |
string.h
| Function Name | Available | RPC Required |
|---|---|---|
| bcmp | {{ check }} | |
| bcopy | {{ check }} | |
| bzero | {{ check }} | |
| memccpy | {{ check }} | |
| memchr | {{ check }} | |
| memcmp | {{ check }} | |
| memcpy | {{ check }} | |
| memmem | {{ check }} | |
| memmove | {{ check }} | |
| mempcpy | {{ check }} | |
| memrchr | {{ check }} | |
| memset | {{ check }} | |
| stpcpy | {{ check }} | |
| stpncpy | {{ check }} | |
| strcat | {{ check }} | |
| strchr | {{ check }} | |
| strchrnul | {{ check }} | |
| strcmp | {{ check }} | |
| strcoll | {{ check }} | |
| strcpy | {{ check }} | |
| strcspn | {{ check }} | |
| strdup | {{ check }} | |
| strerror | {{ check }} | |
| strlcat | {{ check }} | |
| strlcpy | {{ check }} | |
| strlen | {{ check }} | |
| strncat | {{ check }} | |
| strncmp | {{ check }} | |
| strncpy | {{ check }} | |
| strndup | {{ check }} | |
| strnlen | {{ check }} | |
| strpbrk | {{ check }} | |
| strrchr | {{ check }} | |
| strsep | {{ check }} | |
| strspn | {{ check }} | |
| strstr | {{ check }} | |
| strtok | {{ check }} | |
| strtok_r | {{ check }} | |
| strxfrm | {{ check }} |
strings.h
| Function Name | Available | RPC Required |
|---|---|---|
| bcmp | {{ check }} | |
| bcopy | {{ check }} | |
| bzero | {{ check }} | |
| strcasecmp | {{ check }} | |
| strcasestr | {{ check }} | |
| index | {{ check }} | |
| rindex | {{ check }} |
stdbit.h
| Function Name | Available | RPC Required |
|---|---|---|
| stdc_leading_zeros_uc | {{ check }} | |
| stdc_leading_zeros_us | {{ check }} | |
| stdc_leading_zeros_ui | {{ check }} | |
| stdc_leading_zeros_ul | {{ check }} | |
| stdc_leading_zeros_ull | {{ check }} | |
| stdc_trailing_zeros_uc | {{ check }} | |
| stdc_trailing_zeros_us | {{ check }} | |
| stdc_trailing_zeros_ui | {{ check }} | |
| stdc_trailing_zeros_ul | {{ check }} | |
| stdc_trailing_zeros_ull | {{ check }} | |
| stdc_trailing_ones_uc | {{ check }} | |
| stdc_trailing_ones_us | {{ check }} | |
| stdc_trailing_ones_ui | {{ check }} | |
| stdc_trailing_ones_ul | {{ check }} | |
| stdc_trailing_ones_ull | {{ check }} | |
| stdc_first_leading_zero_uc | {{ check }} | |
| stdc_first_leading_zero_us | {{ check }} | |
| stdc_first_leading_zero_ui | {{ check }} | |
| stdc_first_leading_zero_ul | {{ check }} | |
| stdc_first_leading_zero_ull | {{ check }} | |
| stdc_first_leading_one_uc | {{ check }} | |
| stdc_first_leading_one_us | {{ check }} | |
| stdc_first_leading_one_ui | {{ check }} | |
| stdc_first_leading_one_ul | {{ check }} | |
| stdc_first_leading_one_ull | {{ check }} | |
| stdc_first_trailing_zero_uc | {{ check }} | |
| stdc_first_trailing_zero_us | {{ check }} | |
| stdc_first_trailing_zero_ui | {{ check }} | |
| stdc_first_trailing_zero_ul | {{ check }} | |
| stdc_first_trailing_zero_ull | {{ check }} | |
| stdc_first_trailing_one_uc | {{ check }} | |
| stdc_first_trailing_one_us | {{ check }} | |
| stdc_first_trailing_one_ui | {{ check }} | |
| stdc_first_trailing_one_ul | {{ check }} | |
| stdc_first_trailing_one_ull | {{ check }} | |
| stdc_count_zeros_uc | {{ check }} | |
| stdc_count_zeros_us | {{ check }} | |
| stdc_count_zeros_ui | {{ check }} | |
| stdc_count_zeros_ul | {{ check }} | |
| stdc_count_zeros_ull | {{ check }} | |
| stdc_count_ones_uc | {{ check }} | |
| stdc_count_ones_us | {{ check }} | |
| stdc_count_ones_ui | {{ check }} | |
| stdc_count_ones_ul | {{ check }} | |
| stdc_count_ones_ull | {{ check }} | |
| stdc_has_single_bit_uc | {{ check }} | |
| stdc_has_single_bit_us | {{ check }} | |
| stdc_has_single_bit_ui | {{ check }} | |
| stdc_has_single_bit_ul | {{ check }} | |
| stdc_has_single_bit_ull | {{ check }} | |
| stdc_bit_width_uc | {{ check }} | |
| stdc_bit_width_us | {{ check }} | |
| stdc_bit_width_ui | {{ check }} | |
| stdc_bit_width_ul | {{ check }} | |
| stdc_bit_width_ull | {{ check }} | |
| stdc_bit_floor_uc | {{ check }} | |
| stdc_bit_floor_us | {{ check }} | |
| stdc_bit_floor_ui | {{ check }} | |
| stdc_bit_floor_ul | {{ check }} | |
| stdc_bit_floor_ull | {{ check }} | |
| stdc_bit_ceil_uc | {{ check }} | |
| stdc_bit_ceil_us | {{ check }} | |
| stdc_bit_ceil_ui | {{ check }} | |
| stdc_bit_ceil_ul | {{ check }} | |
| stdc_bit_ceil_ull | {{ check }} |
stdlib.h
| Function Name | Available | RPC Required |
|---|---|---|
| abs | {{ check }} | |
| atoi | {{ check }} | |
| atof | {{ check }} | |
| atol | {{ check }} | |
| atoll | {{ check }} | |
| exit | {{ check }} | {{ check }} |
| abort | {{ check }} | {{ check }} |
| system | {{ check }} | {{ check }} |
| labs | {{ check }} | |
| llabs | {{ check }} | |
| div | {{ check }} | |
| ldiv | {{ check }} | |
| lldiv | {{ check }} | |
| bsearch | {{ check }} | |
| qsort | {{ check }} | |
| qsort_r | {{ check }} | |
| strtod | {{ check }} | |
| strtof | {{ check }} | |
| strtol | {{ check }} | |
| strtold | {{ check }} | |
| strtoll | {{ check }} | |
| strtoul | {{ check }} | |
| strtoull | {{ check }} | |
| srand | {{ check }} | |
| rand | {{ check }} |
inttypes.h
| Function Name | Available | RPC Required |
|---|---|---|
| imaxabs | {{ check }} | |
| imaxdiv | {{ check }} | |
| strtoimax | {{ check }} | |
| strtoumax | {{ check }} |
stdio.h
| Function Name | Available | RPC Required |
|---|---|---|
| feof | {{ check }} | {{ check }} |
| ferror | {{ check }} | {{ check }} |
| clearerr | {{ check }} | {{ check }} |
| fseek | {{ check }} | {{ check }} |
| ftell | {{ check }} | {{ check }} |
| fflush | {{ check }} | {{ check }} |
| fgetc | {{ check }} | {{ check }} |
| fgets | {{ check }} | {{ check }} |
| ungetc | {{ check }} | {{ check }} |
| getc | {{ check }} | {{ check }} |
| getchar | {{ check }} | {{ check }} |
| puts | {{ check }} | {{ check }} |
| fputs | {{ check }} | {{ check }} |
| fputc | {{ check }} | {{ check }} |
| fwrite | {{ check }} | {{ check }} |
| remove | {{ check }} | {{ check }} |
| rename | {{ check }} | {{ check }} |
| putc | {{ check }} | {{ check }} |
| printf | {{ check }} | {{ check }} |
| vprintf | {{ check }} | {{ check }} |
| fprintf | {{ check }} | {{ check }} |
| vfprintf | {{ check }} | {{ check }} |
| sprintf | {{ check }} | |
| snprintf | {{ check }} | |
| vsprintf | {{ check }} | |
| vsnprintf | {{ check }} | |
| sscanf | {{ check }} | |
| scanf | {{ check }} | {{ check }} |
| fscanf | {{ check }} | {{ check }} |
| putchar | {{ check }} | {{ check }} |
| fclose | {{ check }} | {{ check }} |
| fopen | {{ check }} | {{ check }} |
| fread | {{ check }} | {{ check }} |
time.h
| Function Name | Available | RPC Required |
|---|---|---|
| clock | {{ check }} | |
| clock_gettime | {{ check }} | |
| nanosleep | {{ check }} | |
| strftime | {{ check }} | |
| strftime_l | {{ check }} |
assert.h
| Function Name | Available | RPC Required |
|---|---|---|
| assert | {{ check }} | {{ check }} |
__assert_fail |
{{ check }} | {{ check }} |