[libc-commits] [libc] e2bc0f9 - [libc][NFC] Remove unused function from the RPC server
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Thu Sep 21 09:56:58 PDT 2023
Author: Joseph Huber
Date: 2023-09-21T11:56:48-05:00
New Revision: e2bc0f9266f74055ce4b93d3182a0619685271a5
URL: https://github.com/llvm/llvm-project/commit/e2bc0f9266f74055ce4b93d3182a0619685271a5
DIFF: https://github.com/llvm/llvm-project/commit/e2bc0f9266f74055ce4b93d3182a0619685271a5.diff
LOG: [libc][NFC] Remove unused function from the RPC server
Summary:
I missed removing this now-unused function in the previous patch. Remove
it to clean up the interface.
Added:
Modified:
libc/utils/gpu/server/rpc_server.cpp
Removed:
################################################################################
diff --git a/libc/utils/gpu/server/rpc_server.cpp b/libc/utils/gpu/server/rpc_server.cpp
index ba58bf3cd6596ac..fbb17dd409214f1 100644
--- a/libc/utils/gpu/server/rpc_server.cpp
+++ b/libc/utils/gpu/server/rpc_server.cpp
@@ -34,16 +34,9 @@ struct Server {
Server(std::unique_ptr<rpc::Server<lane_size>> &&server)
: server(std::move(server)) {}
- uint64_t allocation_size(uint64_t port_count) {
- uint64_t ret = 0;
- std::visit([&](auto &server) { ret = server->allocation_size(port_count); },
- server);
- return ret;
- }
-
rpc_status_t handle_server(
- std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
- std::unordered_map<rpc_opcode_t, void *> &callback_data) {
+ const std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
+ const std::unordered_map<rpc_opcode_t, void *> &callback_data) {
rpc_status_t ret = RPC_STATUS_SUCCESS;
std::visit(
[&](auto &server) {
@@ -57,8 +50,8 @@ struct Server {
template <uint32_t lane_size>
rpc_status_t handle_server(
rpc::Server<lane_size> &server,
- std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
- std::unordered_map<rpc_opcode_t, void *> &callback_data) {
+ const std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
+ const std::unordered_map<rpc_opcode_t, void *> &callback_data) {
auto port = server.try_open();
if (!port)
return RPC_STATUS_SUCCESS;
More information about the libc-commits
mailing list