Summary: This function follows closely with the pattern of all the other functions. That is, making a new opcode and forwarding the call to the host. However, this also required modifying the test somewhat. It seems that not all `libc` implementations follow the same error rules as are tested here, and it is not explicit in the standard, so we simply disable these EOF checks when targeting the GPU.
170 lines
3.9 KiB
ReStructuredText
170 lines
3.9 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
|
|
memcmp |check|
|
|
memcpy |check|
|
|
memmove |check|
|
|
mempcpy |check|
|
|
memrchr
|
|
memset |check|
|
|
stpcpy |check|
|
|
stpncpy |check|
|
|
strcat |check|
|
|
strchr
|
|
strcmp |check|
|
|
strcpy |check|
|
|
strcspn |check|
|
|
strlcat |check|
|
|
strlcpy |check|
|
|
strlen |check|
|
|
strncat |check|
|
|
strncmp |check|
|
|
strncpy |check|
|
|
strnlen |check|
|
|
strpbrk
|
|
strrchr
|
|
strspn |check|
|
|
strstr
|
|
strtok |check|
|
|
strtok_r |check|
|
|
strdup
|
|
strndup
|
|
============= ========= ============
|
|
|
|
stdlib.h
|
|
--------
|
|
|
|
============= ========= ============
|
|
Function Name Available RPC Required
|
|
============= ========= ============
|
|
abs |check|
|
|
atoi |check|
|
|
atof |check|
|
|
atol |check|
|
|
atoll |check|
|
|
exit |check| |check|
|
|
abort |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|
|
|
============= ========= ============
|
|
|
|
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|
|
|
putc |check| |check|
|
|
putchar |check| |check|
|
|
fclose |check| |check|
|
|
fopen |check| |check|
|
|
fread |check| |check|
|
|
============= ========= ============
|
|
|
|
time.h
|
|
------
|
|
|
|
============= ========= ============
|
|
Function Name Available RPC Required
|
|
============= ========= ============
|
|
clock |check|
|
|
nanosleep |check|
|
|
============= ========= ============
|
|
|
|
assert.h
|
|
--------
|
|
|
|
============= ========= ============
|
|
Function Name Available RPC Required
|
|
============= ========= ============
|
|
assert |check| |check|
|
|
__assert_fail |check| |check|
|
|
============= ========= ============
|