~lattis/muon

ref: f9a8cbad39b665a9496cd3adb4756e85ee5ec97c muon/include/data/bucket_array.h -rw-r--r-- 528 bytes
f9a8cbadStone Tickle print stdout/stderr of failing test 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef MUON_DATA_BUCKET_ARRAY_H
#define MUON_DATA_BUCKET_ARRAY_H

#include "darr.h"

struct bucket_array {
	struct darr buckets;
	uint32_t item_size;
	uint32_t bucket_size;
	uint32_t len;
};

void bucket_array_init(struct bucket_array *ba, uint32_t bucket_size, uint32_t item_size);
void *bucket_array_push(struct bucket_array *ba, const void *item);
void *bucket_array_get(const struct bucket_array *ba, uint32_t i);
void bucket_array_clear(struct bucket_array *ba);
void bucket_array_destroy(struct bucket_array *ba);
#endif