Skip to content

Releases: TheLartians/BitLens

v2.2: add PackageProject.cmake (#21)

20 Apr 23:43
7925d2f
Compare
Choose a tag to compare
* add PackageProject

* add install workflow

* add Badge

* ok NOW add install workflow

* fix install interface

* remove non-existant dependencies

v2.1: Better const support (#15)

31 Mar 12:31
dd52ec4
Compare
Choose a tag to compare
* add better const support

* update version

* rename benchmark section

New Iterator API

31 Mar 12:01
d9d055d
Compare
Choose a tag to compare

Why

Based on recent feedback the interface has been changed to resemble C++ standard library containers.

New API

#include <bit_lens.h>
#include <vector>
#include <algorithm>

int main() {
  bit_lens::BitContainer<std::vector<unsigned>> bits; // create a bit container based on vector<unsigned>
  // bit_lens::BitLens bits(container); // or create a lens into an existing container
  bits.resize(10); // resize the container to store at least 10 bits
  bits.size(); // the actual number of bits that the container can store
  bits[8];// gets the 8th bit
  bits[8] = 1; // sets the 8th bit
  for (auto bit: bits) { bit = 1; } // iterate over all bits
  std::count(bits.begin(), bits.end(), true); // <algorithm> compatible iterators
  for (auto &v: bits.data()) { // access the underlying container
    v &= 0b1101; // perform bitwise bulk operations for best performance (see benchmark)
  }
}

Breaking: rename Project to BitLens

30 Mar 10:50
12505c1
Compare
Choose a tag to compare

API changes:

  • CMake's target name BitView -> BitLens
  • Namespace and class rename bit_view::Container -> bit_lens::Lens

Type guards

30 Mar 08:51
dc1e0ef
Compare
Choose a tag to compare
Type safety (#10)

* add type checks and fix #9.

* increase version in readme (to be released after merge)

Remove branch in bit setter

30 Mar 08:09
f0c5c74
Compare
Choose a tag to compare
v1.2

remove code artifact (#8)

v1.1.1

29 Mar 20:38
d38e2e8
Compare
Choose a tag to compare
fill out all values when resizing (#4)

forEach

29 Mar 19:51
b370f4e
Compare
Choose a tag to compare
Merge pull request #3 from TheLartians/foreach

forEach

First release

29 Mar 19:03
268e79d
Compare
Choose a tag to compare
Merge pull request #1 from TheLartians/actionsB

add github actions