| 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <new> |
| 4 | |
| 5 | #include "searchGENOME.H" |
| 6 | |
| 7 | void* |
| 8 | loaderThread(void *) { |
| 9 | encodedQuery *Q = 0L; |
| 10 | seqInCore *B = 0L; |
| 11 | |
| 12 | try { |
| 13 | B = config._qsFASTA->getSequenceInCore(); |
| 14 | } catch (std::bad_alloc) { |
| 15 | fprintf(stderr, "loaderThread()-- Failed to load next query sequence\ncaught bad_alloc in %s at line %d\n", __FILE__, __LINE__); |
| 16 | exit(1); |
| 17 | } |
| 18 | |
| 19 | if (B) { |
| 20 | Q = new encodedQuery(B, config._merSize); |
| 21 | delete B; |
| 22 | } |
| 23 | |
| 24 | return(Q); |
| 25 | } |