[libc-commits] [PATCH] D145913: [libc] Add initial support for an RPC mechanism for the GPU

Johannes Doerfert via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Mar 14 14:00:21 PDT 2023


jdoerfert added inline comments.


================
Comment at: libc/src/__support/OSUtil/gpu/io.cpp:26
+        },
+        [](rpc::Buffer *) {});
+}
----------------
Nit: braces


================
Comment at: libc/src/__support/RPC/rpc.h:7
+//
+//===----------------------------------------------------------------------===//
+
----------------
file comment how this is going to work.

Also add a web documentation document


================
Comment at: libc/src/__support/RPC/rpc.h:20
+enum Opcode : uint64_t {
+  noop = 0,
+  print = 1,
----------------
reserve it, don't call it noon now.


================
Comment at: libc/src/__support/RPC/rpc.h:50
+};
+
+template <typename F, typename U> void Client::run(F fill, U use) {
----------------
Comment for all classes and enums and functions.


================
Comment at: libc/src/__support/RPC/rpc.h:75
+  }
+  // wait for server to garbage collect
+  if (in & !out) {
----------------
Commented with full sentences please.


================
Comment at: libc/src/__support/RPC/rpc.h:83
+
+template <typename W, typename C> bool Server::run(W work, C clean) {
+  bool in = inbox->load(cpp::MemoryOrder::RELAXED);
----------------
maybe handle, or query?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145913/new/

https://reviews.llvm.org/D145913



More information about the libc-commits mailing list