Skip to content

Commit e1015ae

Browse files
authored
[libc][docs] List rand and srand as supported on the GPU (#96757)
Summary: I initially didn't report these as supported because they didn't provide expected behavior and were very wasteful. The recent patch moved them to a lock-free atomic implementation so they can now actually be used.
1 parent 637b7f8 commit e1015ae

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libc/docs/gpu/support.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ strtold |check|
190190
strtoll |check|
191191
strtoul |check|
192192
strtoull |check|
193+
srand |check|
194+
rand |check|
193195
============= ========= ============
194196

195197
inttypes.h

libc/src/stdlib/rand_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace LIBC_NAMESPACE {
1414

15-
// C standard 7.10p2: If 'rand' is called before 'srand' it is to
15+
// C standard 7.10p2: If 'rand' is called before 'srand' it is to
1616
// proceed as if the 'srand' function was called with a value of '1'.
1717
cpp::Atomic<unsigned long> rand_next = 1;
1818

0 commit comments

Comments
 (0)