Changeset: 023a0ed2114f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=023a0ed2114f Modified Files: monetdb5/extras/crackers/crackers_core_unordered.mx Branch: holindex Log Message:
Fix returned position. diffs (54 lines): diff --git a/monetdb5/extras/crackers/crackers_core_unordered.mx b/monetdb5/extras/crackers/crackers_core_unordered.mx --- a/monetdb5/extras/crackers/crackers_core_unordered.mx +++ b/monetdb5/extras/crackers/crackers_core_unordered.mx @@ -1426,9 +1426,9 @@ static str CRKvectorized_MT_@2_@1 (const if (f == BUN_NONE) { f = l; } - /*else { + else { assert(f == l); - }*/ + } } } @@ -1440,11 +1440,6 @@ static str CRKvectorized_MT_@2_@1 (const @1 *tmp_tail = GDKmalloc(remaining_elements * sizeof(@1 )); assert (tmp_head && tmp_tail); - if (f == BUN_NONE) /*if there are not qualifying tuples*/ - { - f = first; - } - while (lowerCursor < upperCursor) { while (lowerCursor < upperCursor && src_t[lowerCursor] @7 pivot) @@ -1473,6 +1468,11 @@ static str CRKvectorized_MT_@2_@1 (const if (qualifying_elements > 0) { + + if (f == last_vector_pos + 1) /*if there are not qualifying tuples*/ + { + f = first; + } if(qualifying_elements <= (last_vector_pos - f + 1)) { memcpy(tmp_head, src_h + f, sizeof(oid)*qualifying_elements); @@ -1491,9 +1491,12 @@ static str CRKvectorized_MT_@2_@1 (const memcpy(tmp_tail, src_t + f, sizeof(@1)*copied_elements); memcpy(src_t + f, src_t + last_vector_pos + 1 + qualifying_elements - copied_elements, sizeof(@1)*copied_elements); memcpy(src_t + last_vector_pos + 1 + qualifying_elements - copied_elements, tmp_tail, sizeof(@1)*copied_elements); - } + } + f += qualifying_elements; } - f += qualifying_elements; + else if (f == last_vector_pos + 1) + f += remaining_elements; + GDKfree(tmp_head); GDKfree(tmp_tail); } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list