|
GPU-Accelerated Cuckoo Filter
|
A shared memory queue implementation for Inter-Process Communication. More...
Public Member Functions | |
| FilterRequest * | enqueue () |
| Attempts to acquire a slot in the queue for a new request. | |
| void | signalEnqueued () |
| Signals that a new request has been enqueued and is ready for processing. | |
| FilterRequest * | dequeue () |
| Dequeues the next pending request. | |
| void | signalDequeued () |
| Signals that a request has been processed and the slot is free. | |
| size_t | pendingRequests () const |
| Returns the number of pending requests in the queue. | |
| void | initiateShutdown () |
| Initiates the shutdown process for the queue. | |
| bool | isShuttingDown () const |
| Checks if the queue is in shutdown mode. | |
| size_t | cancelPendingRequests () |
| Cancels all pending requests in the queue. | |
Public Attributes | |
| std::atomic< uint64_t > | head |
| Producer index. | |
| std::atomic< uint64_t > | tail |
| Consumer index. | |
| sem_t | producerSem |
| Semaphore for available slots. | |
| sem_t | consumerSem |
| Semaphore for pending requests. | |
| FilterRequest | requests [QUEUE_SIZE] |
| std::atomic< bool > | initialised |
| Whether the queue has been initialised. | |
| std::atomic< bool > | shuttingDown |
| Whether the queue is shutting down. | |
Static Public Attributes | |
| static constexpr size_t | QUEUE_SIZE = 256 |
A shared memory queue implementation for Inter-Process Communication.
This structure manages a ring buffer of requests in shared memory, using semaphores for synchronization between the producer (client) and consumer (server).
Definition at line 53 of file CuckooFilterIPC.cuh.
|
inline |
Cancels all pending requests in the queue.
Marks all uncompleted requests as cancelled and completed.
Definition at line 164 of file CuckooFilterIPC.cuh.
|
inline |
Dequeues the next pending request.
This function blocks until a request is available.
Definition at line 111 of file CuckooFilterIPC.cuh.
|
inline |
Attempts to acquire a slot in the queue for a new request.
This function blocks until a slot is available or the server shuts down.
Definition at line 74 of file CuckooFilterIPC.cuh.
|
inline |
Initiates the shutdown process for the queue.
Definition at line 145 of file CuckooFilterIPC.cuh.
|
inline |
Checks if the queue is in shutdown mode.
Definition at line 153 of file CuckooFilterIPC.cuh.
|
inline |
Returns the number of pending requests in the queue.
Definition at line 138 of file CuckooFilterIPC.cuh.
|
inline |
Signals that a request has been processed and the slot is free.
Definition at line 129 of file CuckooFilterIPC.cuh.
|
inline |
Signals that a new request has been enqueued and is ready for processing.
Definition at line 100 of file CuckooFilterIPC.cuh.
| sem_t cuckoogpu::SharedQueue::consumerSem |
Semaphore for pending requests.
Definition at line 60 of file CuckooFilterIPC.cuh.
| std::atomic<uint64_t> cuckoogpu::SharedQueue::head |
Producer index.
Definition at line 57 of file CuckooFilterIPC.cuh.
| std::atomic<bool> cuckoogpu::SharedQueue::initialised |
Whether the queue has been initialised.
Definition at line 64 of file CuckooFilterIPC.cuh.
| sem_t cuckoogpu::SharedQueue::producerSem |
Semaphore for available slots.
Definition at line 59 of file CuckooFilterIPC.cuh.
|
staticconstexpr |
Definition at line 54 of file CuckooFilterIPC.cuh.
| FilterRequest cuckoogpu::SharedQueue::requests[QUEUE_SIZE] |
Definition at line 62 of file CuckooFilterIPC.cuh.
| std::atomic<bool> cuckoogpu::SharedQueue::shuttingDown |
Whether the queue is shutting down.
Definition at line 65 of file CuckooFilterIPC.cuh.
| std::atomic<uint64_t> cuckoogpu::SharedQueue::tail |
Consumer index.
Definition at line 58 of file CuckooFilterIPC.cuh.