 INLINE uint64_t nchoose2(T x) {
     return (uint64_t(x) * uint64_t(x - 1)) / 2;
 }
+
+enum HLLStorage: int {
+    DEFAULT_6_BIT,
+    PACKED_4_BIT,
+    WIDE_8_BIT
+};
 
 
 template<typename T>

#endif
            cudaDeviceSynchronize();
            if(copy_and_flush.joinable()) copy_and_flush.join();
            size_t nb = nelem_ * elemsz() * round_nrows;
            std::fprintf(stderr, "drmem %p. nb: %zu. round nr: %zu\n", (void *)drmem_, nb, round_nrows);
            std::fprintf(stderr, "cmem %p\n", (void *)cmem_);

        if(nrows == 0) nrows = numrows_;
        assert(fp_);
        if(use_gz_) {
            if(gzwrite(static_cast<gzFile>(fp_), cmem_, nrows * nelem_ * elemsz()) != nelem_ * nrows * elemsz())
                throw ZlibError("Failed to write to file\n");
        } else {
            if(std::fwrite(cmem_, elemsz(), nelem_ * nrows, static_cast<std::FILE *>(fp_)) != nelem_ * nrows)
                throw std::runtime_error("Failed to write to file\n");
        }
    }
