[all-commits] [llvm/llvm-project] 31d4f0: [libc][NFC] Cleanup the GPU file I/O utility heade...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Fri Sep 8 12:16:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31d4f0692f690cff30d50eeb46513f8c9c9eb720
https://github.com/llvm/llvm-project/commit/31d4f0692f690cff30d50eeb46513f8c9c9eb720
Author: Joseph Huber <35342157+jhuber6 at users.noreply.github.com>
Date: 2023-09-08 (Fri, 08 Sep 2023)
Changed paths:
M libc/src/stdio/gpu/file.h
Log Message:
-----------
[libc][NFC] Cleanup the GPU file I/O utility header (#65680)
Summary:
The GPU uses separate implementations to perform file IO. This is all
done through the RPC interface and we kept it minimal such that we could
treat a `stdin`, `stdout`, or `stderr` handle from the CPU correctly on
the GPU. The RPC implementation uses different opcodes for whether or
not we are using one of the standard streams. This is so we do not need
to initialize anything to access the CPU's standard stream, because the
server knows that it should print to `stdout` if it gets the `STDOUT`
variant of the opcode. It also saves us an RPC call, which are expensive
relatively speaking. This patch simply cleans up this interface to make
them all use a common function. This is done in preparation to implement
some more file IO functions like getc or putc.
More information about the All-commits
mailing list