mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 23:16:06 +00:00

This patch enables us to use the existing `libc` support for string conversion functions on the GPU. This required setting the `fenv_t` and long double configuration. As far as I am aware, long doubles are converted to doubles on the GPU and the floating point environment is just an `uint32_t`. This code is still untested as we are still working out how to run the unit tests on the GPU. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D149306
100 lines
2.2 KiB
ReStructuredText
100 lines
2.2 KiB
ReStructuredText
.. _libc_gpu_support:
|
|
|
|
===================
|
|
Supported Functions
|
|
===================
|
|
|
|
.. include:: ../check.rst
|
|
|
|
.. contents:: Table of Contents
|
|
:depth: 4
|
|
:local:
|
|
|
|
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
|
|
`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|
|
|
bzero |check|
|
|
memccpy |check|
|
|
memchr |check|
|
|
memcmp |check|
|
|
memcpy |check|
|
|
memmove |check|
|
|
mempcpy |check|
|
|
memrchr |check|
|
|
memset |check|
|
|
stpcpy |check|
|
|
stpncpy |check|
|
|
strcat |check|
|
|
strchr |check|
|
|
strcmp |check|
|
|
strcpy |check|
|
|
strcspn |check|
|
|
strlcat |check|
|
|
strlcpy |check|
|
|
strlen |check|
|
|
strncat |check|
|
|
strncmp |check|
|
|
strncpy |check|
|
|
strnlen |check|
|
|
strpbrk |check|
|
|
strrchr |check|
|
|
strspn |check|
|
|
strstr |check|
|
|
strtok |check|
|
|
strtok_r |check|
|
|
strdup
|
|
strndup
|
|
============= ========= ============
|
|
|
|
stdlib.h
|
|
--------
|
|
|
|
============= ========= ============
|
|
Function Name Available RPC Required
|
|
============= ========= ============
|
|
atoi |check|
|
|
atof |check|
|
|
atol |check|
|
|
atoll |check|
|
|
atexit |check|
|
|
strtod |check|
|
|
strtof |check|
|
|
strtol |check|
|
|
strtold |check|
|
|
strtoll |check|
|
|
strtoul |check|
|
|
strtoull |check|
|
|
============= ========= ============
|