- if (old_size < thread_id + 1) {
- for (int i = old_size; i < thread_id + 1; i++ ) {
- associated_reads.push_back(VALUE_NONE);
- thrd_marker.push_back(0);
+ if (associated_reads.size() < (uint) thread_id + 1) {
+ int old_size = associated_reads.size();
+ int new_size = thread_id + 1;
+
+ associated_reads.resize(new_size);
+ thrd_markers.resize(new_size);
+
+ for (int i = old_size; i < new_size; i++ ) {
+ associated_reads[i] = new ModelVector<uint64_t>();
+ thrd_markers[i] = new ModelVector<uint32_t>();
+ }
+ }
+
+ ModelVector<uint64_t> * read_values = associated_reads[thread_id];
+ ModelVector<uint32_t> * markers = thrd_markers[thread_id];
+ if (read_values->size() < (uint) index + 1) {
+ int old_size = read_values->size();
+
+ for (int i = old_size; i < index + 1; i++) {
+ read_values->push_back(VALUE_NONE);
+ markers->push_back(0);