| 1 | /* |
| 2 | August 2012 Code has been optimised for speed by Tessella, funded by Unilever. |
| 3 | See comments in code for details of optimisation changes. |
| 4 | Output has been verified to be unaffected by these changes. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NDIST_MPI_H |
| 8 | #define NDIST_MPI_Hcxx . . $ `NDist/NDist.h:8:9`! |
| 9 | |
| 10 | typedef struct s_Paramscxx . . $ s_Params# |
| 11 | { |
| 12 | char *szInputFilecxx . . $ s_Params#szInputFile.; |
| 13 | |
| 14 | int bIdentcxx . . $ s_Params#bIdent.; |
| 15 | |
| 16 | int bPhylipcxx . . $ s_Params#bPhylip.; |
| 17 | } t_Paramscxx . . $ t_Params#; |
| 18 | |
| 19 | typedef struct s_Datacxx . . $ s_Data# |
| 20 | { |
| 21 | char* acSequencescxx . . $ s_Data#acSequences.; |
| 22 | |
| 23 | char** aszIDcxx . . $ s_Data#aszID.; |
| 24 | |
| 25 | int nSeqcxx . . $ s_Data#nSeq.; |
| 26 | |
| 27 | int nMaxLencxx . . $ s_Data#nMaxLen.; |
| 28 | |
| 29 | int* anLencxx . . $ s_Data#anLen.; |
| 30 | } t_Datacxx . . $ t_Data#; |
| 31 | |
| 32 | |
| 33 | /**Constants**/ |
| 34 | #define MAX_LINE_LENGTHcxx . . $ `NDist/NDist.h:34:9`! 65536 |
| 35 | #define DELIMcxx . . $ `NDist/NDist.h:35:9`! " \n" |
| 36 | |
| 37 | #define FALSEcxx . . $ `NDist/NDist.h:37:9`! 0 |
| 38 | #define TRUEcxx . . $ `NDist/NDist.h:38:9`! 1 |
| 39 | |
| 40 | /* Input Definitions */ |
| 41 | #define OPTIONcxx . . $ `NDist/NDist.h:41:9`! 0 /* optional */ |
| 42 | #define ALWAYScxx . . $ `NDist/NDist.h:42:9`! 1 /* required */ |
| 43 | |
| 44 | #define INPUT_FILEcxx . . $ `NDist/NDist.h:44:9`! "-in" |
| 45 | #define IDENTcxx . . $ `NDist/NDist.h:45:9`! "-i" |
| 46 | #define PHYLIPcxx . . $ `NDist/NDist.h:46:9`! "-p" |
| 47 | |
| 48 | #define GAP_PENALTYcxx . . $ `NDist/NDist.h:48:9`! 1.5 |
| 49 | #define GAPcxx . . $ `NDist/NDist.h:49:9`! '-' |
| 50 | |
| 51 | #define DIAGcxx . . $ `NDist/NDist.h:51:9`! 0 |
| 52 | #define LEFTcxx . . $ `NDist/NDist.h:52:9`! 1 |
| 53 | #define UPcxx . . $ `NDist/NDist.h:53:9`! 2 |
| 54 | |
| 55 | #define MAX_PACKET_SIZEcxx . . $ `NDist/NDist.h:55:9`! 1048576 |
| 56 | |
| 57 | |
| 58 | #ifndef min |
| 59 | #define mincxx . . $ `NDist/NDist.h:59:9`!(x, y) ((x) < (y) ? (x) : (y)) |
| 60 | #endif |
| 61 | |
| 62 | #ifndef max |
| 63 | #define maxcxx . . $ `NDist/NDist.h:63:9`!(x, y) ((x) > (y) ? (x) : (y)) |
| 64 | #endif |
| 65 | |
| 66 | /* August 2012 |
| 67 | Speed optimisation 5B: inline loop functions */ |
| 68 | #ifndef dist |
| 69 | #define distcxx . . $ `NDist/NDist.h:69:9`!(a, b) ((a) == (b) ? 0 : 1) |
| 70 | #endif |
| 71 | |
| 72 | #ifndef getMove |
| 73 | #define getMovecxx . . $ `NDist/NDist.h:73:9`!(a, b, c) ((a) < (b) ? ((a) >= (c) ? UPcxx . . $ `NDist/NDist.h:53:9`! : DIAGcxx . . $ `NDist/NDist.h:51:9`!) : ((b) < (c) ? LEFTcxx . . $ `NDist/NDist.h:52:9`! : UPcxx . . $ `NDist/NDist.h:53:9`!)) |
| 74 | #endif |
| 75 | |
| 76 | #ifndef dmin3 |
| 77 | #define dmin3cxx . . $ `NDist/NDist.h:77:9`!(a, b, c) ((a) < (b) ? ((c) < (a) ? (c) : (a)) : ((c) < (b) ? (c) : (b))) |
| 78 | #endif |
| 79 | |
| 80 | /* User defined structures */ |
| 81 | |
| 82 | |
| 83 | typedef struct s_Aligncxx . . $ s_Align# |
| 84 | { |
| 85 | // char* acA; |
| 86 | |
| 87 | //char* acB; |
| 88 | |
| 89 | int nLencxx . . $ s_Align#nLen.; |
| 90 | |
| 91 | int nCompcxx . . $ s_Align#nComp.; |
| 92 | |
| 93 | double dDistcxx . . $ s_Align#dDist.; |
| 94 | } t_Aligncxx . . $ t_Align#; |
| 95 | |
| 96 | |
| 97 | /*User defined functions*/ |
| 98 | |
| 99 | void getCommandLineParamscxx . . $ getCommandLineParams(e21a2e221db30366).(t_Paramscxx . . $ t_Params# *ptParams,int argc,char *argv[]); |
| 100 | |
| 101 | void readDatacxx . . $ readData(c6e12b0313806329).(t_Datacxx . . $ t_Data# *ptData, t_Paramscxx . . $ t_Params# *ptParams); |
| 102 | |
| 103 | void getCommandLineParamscxx . . $ getCommandLineParams(e21a2e221db30366).(t_Paramscxx . . $ t_Params# *ptParams,int argc,char *argv[]); |
| 104 | |
| 105 | void needlemanWunschcxx . . $ needlemanWunsch(e2a4651a76c49494).(t_Aligncxx . . $ t_Align# *ptAlign, const char* acA, const char* acB, int nLenA, int nLenB, double** aadFMatrix, int** aanMoves); |
| 106 | |
| 107 | #endif |