-
Notifications
You must be signed in to change notification settings - Fork 11
/
util_lib.h
44 lines (32 loc) · 866 Bytes
/
util_lib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __UTIL_LIB_H
#define __UTIL_LIB_H
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "hmm.h"
double **dmatrix(int num_col);
int **imatrix(int num_col);
int *ivector(int nh);
void free_dmatrix(double **m);
void free_imatrix(int **m);
int tr2int (char *nt);
int nt2int (char nt);
int nt2int_rc (char nt);
int trinucleotide (char a, char b, char c);
void get_protein(char *dna, char *protein, int strand);
void print_usage();
typedef struct q {
struct q* next;
thread_data* td;
unsigned int buffer;
} QUEUE;
QUEUE* q_empty_head;
QUEUE* q_empty_tail;
QUEUE* q_done_head;
QUEUE* q_done_tail;
void printq(unsigned int which);
void enq(thread_data* td, unsigned int buffer, unsigned int which);
QUEUE* deq(unsigned int which);
void cutnpaste_q(QUEUE** dest, unsigned int which);
void stopMemset(char* ptr, int length);
#endif