Skip to content

Commit

Permalink
Remove unused left overs from the mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
betatim committed Feb 1, 2017
1 parent 28d41a3 commit 641436f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion lib/khmer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef unsigned short int BoundedCounterType;

// A single-byte type.
typedef unsigned char Byte;
typedef std::atomic<uint8_t> AtomicByte;
using AtomicByte = std::atomic<uint8_t>;


typedef void (*CallbackFn)(const char * info, void * callback_data,
Expand Down
6 changes: 0 additions & 6 deletions lib/storage.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ Contact: [email protected]
#ifndef STORAGE_HH
#define STORAGE_HH

#include <cassert>
#include <array>
#include <mutex>
using MuxGuard = std::lock_guard<std::mutex>;

namespace khmer
{
Expand Down Expand Up @@ -262,8 +258,6 @@ public:
NibbleStorage(std::vector<uint64_t>& tablesizes) :
_tablesizes{tablesizes}, _occupied_bins{0}, _n_unique_kmers{0}
{
// to allow more than 32 tables increase the size of mutex pool
assert(_n_tables <= 32);
_allocate_counters();
}

Expand Down
3 changes: 0 additions & 3 deletions tests/test_countgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,6 @@ def test_get_raw_tables_smallcountgraph():
# smallcountgraphs store individual counts packed into a byte, the raw tables
# probably do not give users what they expect (something that can be
# given to numpy.frombuffer)

# for the same number of entries a SmallCountgraph uses ~half the memory
# of a normal Countgraph
ht = khmer.SmallCountgraph(20, 1e5, 4)
assert not hasattr(ht, 'get_raw_tables')

Expand Down

0 comments on commit 641436f

Please sign in to comment.