[libc-commits] [PATCH] D153304: [libc] Remove flexible array and replace with a template

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jun 19 17:55:09 PDT 2023


jhuber6 added inline comments.


================
Comment at: libc/utils/gpu/server/Server.cpp:292
 
 void rpc_recv_and_send(rpc_port_t ref, rpc_port_callback_ty callback,
                        void *data) {
----------------
JonChesterfield wrote:
> This would be much clearer if recv_and_send took lane size as a template parameter. Would delete all the copy/paste currently in the method.
This is supposed to be used externally so we can't put it in a template. The difficulty is mainly casting the opaque wrapper to the proper type. I don't like how ugly it all is, maybe I'll think of a better solution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153304



More information about the libc-commits mailing list