ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / src / ggml-rpc / transport-apple.h
| 1 | #pragma once |
| 2 | |
| 3 | #include <cstddef> |
| 4 | #include <cstdint> |
| 5 | #include <memory> |
| 6 | |
| 7 | struct apple_rdma { |
| 8 | // target_gid is 16 bytes in, caps is RPC_CONN_CAPS_SIZE bytes out. |
| 9 | static std::unique_ptr<apple_rdma> probe(int fd, const uint8_t * target_gid, uint8_t * caps); |
| 10 | ~apple_rdma(); |
| 11 | |
| 12 | // Peer endpoint from its caps, which must be non-zero: this blocks on a |
| 13 | // readiness handshake over fd that the peer only joins if it also has RDMA. |
| 14 | bool activate(const uint8_t * caps); |
| 15 | |
| 16 | bool send(const void * data, size_t size); |
| 17 | bool recv(void * data, size_t size); |
| 18 | // Post the trailing partial frame; must be called at every message boundary. |
| 19 | bool flush(); |
| 20 | // True once the connection has failed; the caller should drop the socket. |
| 21 | bool broken() const; |
| 22 | |
| 23 | private: |
| 24 | struct impl; |
| 25 | explicit apple_rdma(std::unique_ptr<impl> p); |
| 26 | std::unique_ptr<impl> pimpl; |
| 27 | }; |