Next version of JABA
[jabaws.git] / binaries / src / fasta34 / dropnfa.h
1
2 /* global definitions shared by dropnfa.c and altivec.c */
3
4 #ifndef MAXSAV
5 #define MAXSAV 10
6 #endif
7
8
9
10 struct dstruct          /* diagonal structure for saving current run */
11 {                       
12    int     score;       /* hash score of current match */
13    int     start;       /* start of current match */
14    int     stop;        /* end of current match */
15    struct savestr *dmax;   /* location in vmax[] where best score data saved */
16 };
17
18 struct savestr
19 {
20    int     score;               /* pam score with segment optimization */
21    int     score0;              /* pam score of best single segment */
22    int     gscore;              /* score from global match */
23    int     dp;                  /* diagonal of match */
24    int     start;               /* start of match in lib seq */
25    int     stop;                /* end of match in lib seq */
26 };
27
28 struct bdstr { int CC, DD, CP, DP;};
29
30 struct f_struct {
31   struct dstruct *diag;
32   struct savestr vmax[MAXSAV];  /* best matches saved for one sequence */
33   struct savestr *vptr[MAXSAV];
34   struct savestr *lowmax;
35   int ndo;
36   int noff;
37   int hmask;                    /* hash constants */
38   int *pamh1;                   /* pam based array */
39   int *pamh2;                   /* pam based kfact array */
40   int *link, *harr;             /* hash arrays */
41   int kshft;                    /* shift width */
42   int nsav, lowscor;            /* number of saved runs, worst saved run */
43 #ifdef TFASTA
44   unsigned char *aa1x;
45   int n10;
46 #endif
47   struct bdstr *bss;
48   struct swstr *ss;
49   struct swstr *f_ss, *r_ss;
50   int *waa0;
51   int *waa1;
52   int *res;
53   int max_res;
54   double aa0_f[MAXSQ];
55   double *kar_p;
56  
57 #ifdef FA_ALTIVEC
58   int vec_len;
59   vecInt **vec_matrix;
60   vector signed ALTIVEC_SIZE *vec_HH;
61   vector signed ALTIVEC_SIZE *vec_EE;
62
63   int vec_len2;
64   vecInt2 **vec_matrix2;
65   vector signed ALTIVEC_SIZE2 *vec_HH2;
66   vector signed ALTIVEC_SIZE2 *vec_EE2;
67 #endif
68 };
69
70 static int
71 FLOCAL_ALIGN(const unsigned char *A, const unsigned char *B,
72              int M, int N, int low, int up,
73              int **W, int G,int H, int MW,
74              struct f_struct *f_str);