make sdust working with kalloc

This commit is contained in:
Heng Li
2017-04-06 15:51:36 -04:00
parent 01baa847a1
commit bacb7534d2
4 changed files with 372 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifndef SDUST_H
#define SDUST_H
struct sdust_buf_s;
typedef struct sdust_buf_s sdust_buf_t;
#ifdef __cplusplus
extern "C" {
#endif
// the simple interface
uint64_t *sdust(const uint8_t *seq, int l_seq, int T, int W, int *n);
// the following interface dramatically reduce heap allocations when sdust is frequently called.
sdust_buf_t *sdust_buf_init(void);
void sdust_buf_destroy(sdust_buf_t *buf);
const uint64_t *sdust_core(const uint8_t *seq, int l_seq, int T, int W, int *n, sdust_buf_t *buf);
#ifdef __cplusplus
}
#endif
#endif