X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bgzf.h;h=cb67681544b51f96efef226fa7a6232124c43420;hb=ccb7838cb53bf0ca6917a77f7991d940057c12db;hp=2a70bb902771d937432602045842bf7e0cf1711c;hpb=d46afb500a437323dda82920f9fb18324b2dbec0;p=samtools.git diff --git a/bgzf.h b/bgzf.h index 2a70bb9..cb67681 100644 --- a/bgzf.h +++ b/bgzf.h @@ -31,6 +31,7 @@ #include #include #include +#include #define BGZF_BLOCK_SIZE 0xff00 // make sure compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE #define BGZF_MAX_BLOCK_SIZE 0x10000 @@ -190,6 +191,13 @@ extern "C" { */ int bgzf_read_block(BGZF *fp); + /** + * Enable multi-threading (only effective on writing) + * + * @param fp BGZF file handler; must be opened for writing + * @param n_threads #threads used for writing + * @param n_sub_blks #blocks processed by each thread; a value 64-256 is recommended + */ int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks); #ifdef __cplusplus