[libc-commits] [PATCH] D149598: [libc] Support concurrent RPC port access on the GPU
Jon Chesterfield via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed May 3 10:56:37 PDT 2023
JonChesterfield added inline comments.
================
Comment at: libc/src/__support/RPC/rpc.h:398
+ for (uint64_t index = 0; index < port_size; ++index) {
+ uint32_t in = inbox[index].load(cpp::MemoryOrder::RELAXED);
+ uint32_t out = outbox[index].load(cpp::MemoryOrder::RELAXED);
----------------
jhuber6 wrote:
> JonChesterfield wrote:
> > Is all this a straight copy/paste from the above? Why are client/server open even different functions, they could be identical
> They're slightly different. The client open function only works if the port is capable of sending data while the server only works if it's capable of receiving it. I could probably template that somehow, but I didn't see the need.
Refer to D148191 for an example of using a single function for both. Traditional arguments for not copy/paste/slightly-change functions which pick up performance related changes over time apply really.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149598/new/
https://reviews.llvm.org/D149598
More information about the libc-commits
mailing list