Derive-C
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdbool.h>
4#include <stddef.h>
5
6static inline bool _dc_deque_rebalance_policy(size_t total_size, size_t front_size,
7 size_t back_size) {
8 (void)total_size;
9 // JUSTIFY: Simple lazy rebalance strategy
10 // - Simple & correct strategy.
11 // TODO(oliverkillane): Consider how we could parameterize this for different applications
12 return (front_size == 0 && back_size > 0) || (back_size == 0 && front_size > 0);
13}
static bool _dc_deque_rebalance_policy(size_t total_size, size_t front_size, size_t back_size)
Definition utils.h:6