Debian Codegraph @

seagen/thr-output.C

raw symbols SCIP
1 #cxx . . $ `<file>/seagen/thr-output.C`/include <stdio.h>
2 #include <stdlib.h>
3 #include <new>
4
5 #include "searchGENOME.H"cxx . . $ `<file>/seagen/searchGENOME.H`/
6
7 #if 0
8 void
9 statusThread(void *) {
10 double finish = 0.0;
11
12 if (config._outputPos > 0)
13 finish = (config._numberOfQueries - config._outputPos) / (config._outputPos / (getTime() - config._zeroTime));
14
15 fprintf(stderr, "O:"uint32FMTW(7)" S:"uint32FMTW(7)" I:"uint32FMTW(7)" T:"uint32FMTW(7)" (%5.1f%%; %8.3f/sec) Finish in %5.2f seconds.\r",
16 outputPos,
17 inputTail,
18 inputHead,
19 numberOfQueries,
20 100.0 * outputPos / numberOfQueries,
21 outputPos / (getTime() - zeroTime),
22 finish);
23 fflush(stderr);
24
25 double perSec = outputPos / (getTime() - zeroTime + 0.0000001);
26
27 if (perSec < 32.0)
28 outputMask = 0xf;
29 else if (perSec < 256.0)
30 outputMask = 0x7f;
31 else if (perSec < 1024.0)
32 outputMask = 0x1ff;
33 else
34 outputMask = 0x3ff;
35 }
36 #endif
37
38
39
40 void*
41 writerThreadcxx . . $ writerThread(1328c93ee22f3bc1).(void *U, void *Q) {
42 encodedQuerycxx . . $ encodedQuery# *query = (encodedQuerycxx . . $ encodedQuery# *)Q;
43
44 // Write the hits
45 //
46 if (query->theOutputLengthcxx . . $ encodedQuery#theOutputLength(db52760e79bf9054).() > 0) {
47 errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0;
48 write(configcxx . . $ config.._outputFilecxx . . $ configuration#_outputFile., query->theOutputcxx . . $ encodedQuery#theOutput(41208ce6ca65dd58).(), query->theOutputLengthcxx . . $ encodedQuery#theOutputLength(db52760e79bf9054).());
49 if (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)
50 fprintf(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Couldn't write to the output file '%s'.\n%s\n",
51 configcxx . . $ config.._outputFileNamecxx . . $ configuration#_outputFileName., strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)), exitcxx . . $ exit(44ed87f96534fad7).(1);
52 }
53
54 // Write the query match counts, too!
55 //
56 if (configcxx . . $ config.._matchCountsFilecxx . . $ configuration#_matchCountsFile.) {
57 char str[256];
58
59 sprintf(str, uint32FMTcxx . . $ `libutil/util.h:65:10`!"\n", query->numberOfResultscxx . . $ encodedQuery#numberOfResults(db52760e79bf9054).());
60
61 errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0;
62 write(configcxx . . $ config.._matchCountsFilecxx . . $ configuration#_matchCountsFile., str, strlen(str));
63 if (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)
64 fprintf(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Couldn't write to the match counts file '%s'.\n%s\n",
65 configcxx . . $ config.._queryMatchFileNamecxx . . $ configuration#_queryMatchFileName., strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)), exitcxx . . $ exit(44ed87f96534fad7).(1);
66 }
67
68 delete query;
69
70 return(0L);
71 }