Allows moving the pointer swap between server and client into reset.
Single allocation simplifies whatever allocates the client/server, currently
the libc loaders.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
constexpr on the functions allowed ad hoc testing along the lines of:
enum {N = 128}; struct equiv { atomic<uint32_t> primary[N]; atomic<uint32_t> secondary[N]; Packet buffer[N]; }; static_assert(Process<false>::memory_offset_primary_mailbox(N) == __builtin_offset(equiv, primary));
but I can't see an obvious place to check in tests like that
libc/src/__support/RPC/rpc.h | ||
---|---|---|
123 | Static cast | |
123 | This is unrelated, but I think we might want to call InvertInbox something more descriptive in the fact that it's the server / client. | |
131 | ||
274 | Not sure we need to bother with the macro, I'm sure the optimizer can handle forwarding 32 or __AMDGCN_WAVEFRONTSIZE. | |
libc/src/__support/RPC/rpc_util.h | ||
54 ↗ | (On Diff #521189) | Did you format this with a different style? |
libc/startup/gpu/amdgpu/start.cpp | ||
41 | I'd like something more like rpc_shared_buffer or something so we know what it's for. |
libc/src/__support/RPC/rpc.h | ||
---|---|---|
274 | gone with this so it matches the definition of the payload type. alternative is something like sizeof(header) + lane_size*N which seems more obscure | |
libc/src/__support/RPC/rpc_util.h | ||
54 ↗ | (On Diff #521189) | no, adding constexpr hit a line limit. can drop constexpr across the board from this patch if necessary |
We can clean some of this stuff up later. Thinking about doing a big NFC for comments and other things.
Static cast