-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.txt
43 lines (33 loc) · 1.63 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
static inherit from base with most functionality, derived just has data storage rather than janky include impl, or CRTP?
and/or range/container adapter
simd
inc/dec by find first set and find first zero
benchmarks versus other libraries
forget interleave/spread? but expose scatter/gather
bits::bitarray<size, T = size_t> = std::array<T, size>
copy, move ctors
everything implemented
bits::bitvector<T = size_t> = std::vector<T>
performance warning copy operators
bits::bitspan<size = std::dynamic_extent, T = size_t> = std::span<T, size>
disable copy operators
can they all be implemented on the same underlying type?
they should interoperate
bitarray op bitvector should work
easiest if there's a single underlying type
casts between sizes, storage types?
what if two bitvectors have different dynamic sizes?
zero-extend? one-extend? sign-extend?
make it the users problem:
error if the sizes differ
virtual zero bits could work?
assuming ones are important in most cases
https://github.com/ClaasBontus/bitset2
fix test suite
reference type https://en.cppreference.com/w/cpp/utility/bitset/reference
iterators for for loops?
implement casts between bitarray, bitvector, bitspan
std::bitset is not trivially copyable by the standard, but is in practice (big three std libs), use std::bit_cast to cast from/to it
see https://quuxplusone.github.io/blog/2019/02/20/p1144-what-types-are-relocatable/
pretty much like std::array "This container is an aggregate type with the same semantics as a struct holding a C-style array T[N] as its only non-static data member."
implement span_cast and array_cast for conversions