parasail_result_t* parasail_result_new_rowcol3(const int a, const int b) { /* declare all variables */ parasail_result_t *result = NULL; /* validate inputs */ assert(a > 0); assert(b > 0); /* allocate struct to hold memory */ result = parasail_result_new_rowcol1(a, b); result->matches_row = (int *)malloc(sizeof(int)*b); assert(result->matches_row); result->similar_row = (int *)malloc(sizeof(int)*b); assert(result->similar_row); result->length_row = (int *)malloc(sizeof(int)*b); assert(result->length_row); result->matches_col = (int *)malloc(sizeof(int)*a); assert(result->matches_col); result->similar_col = (int *)malloc(sizeof(int)*a); assert(result->similar_col); result->length_col = (int *)malloc(sizeof(int)*a); assert(result->length_col); return result; }
#define ENAME parasail_sw_rowcol #else #define ENAME parasail_sw #endif #endif parasail_result_t* ENAME( const char * const restrict _s1, const int s1Len, const char * const restrict _s2, const int s2Len, const int open, const int gap, const parasail_matrix_t *matrix) { #ifdef PARASAIL_TABLE parasail_result_t *result = parasail_result_new_table1(s1Len, s2Len); #else #ifdef PARASAIL_ROWCOL parasail_result_t *result = parasail_result_new_rowcol1(s1Len, s2Len); #else parasail_result_t *result = parasail_result_new(); #endif #endif int * const restrict s1 = parasail_memalign_int(16, s1Len); int * const restrict s2 = parasail_memalign_int(16, s2Len); int * const restrict tbl_pr = parasail_memalign_int(16, s2Len+1); int * const restrict del_pr = parasail_memalign_int(16, s2Len+1); int i = 0; int j = 0; int score = NEG_INF_32; int end_query = s1Len; int end_ref = s2Len; for (i=0; i<s1Len; ++i) {