~ubuntu-branches/ubuntu/precise/gmap/precise

« back to all changes in this revision

Viewing changes to src/resulthr.c

  • Committer: Package Import Robot
  • Author(s): Shaun Jackman
  • Date: 2011-12-07 10:46:12 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20111207104612-4jdx1gj67oi1tx0w
Tags: 2011-11-30-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
static char rcsid[] = "$Id: resulthr.c 43367 2011-07-21 20:47:54Z twu $";
 
1
static char rcsid[] = "$Id: resulthr.c 51812 2011-11-06 18:17:08Z twu $";
2
2
#ifdef HAVE_CONFIG_H
3
3
#include <config.h>
4
4
#endif
24
24
  int id;
25
25
  void **array;
26
26
  int npaths;
 
27
  int second_absmq;
27
28
  void **array2;
28
29
  int npaths2;
 
30
  int second_absmq2;
29
31
  double worker_runtime;
30
32
};
31
33
 
70
72
 
71
73
 
72
74
void **
73
 
Result_array (int *npaths, T this) {
 
75
Result_array (int *npaths, int *second_absmq, T this) {
74
76
  *npaths = this->npaths;
 
77
  *second_absmq = this->second_absmq;
75
78
  return this->array;
76
79
}
77
80
 
78
81
 
79
82
void **
80
 
Result_array2 (int *npaths, T this) {
 
83
Result_array2 (int *npaths, int *second_absmq, T this) {
81
84
  *npaths = this->npaths2;
 
85
  *second_absmq = this->second_absmq2;
82
86
  return this->array2;
83
87
}
84
88
 
89
93
 
90
94
 
91
95
T
92
 
Result_single_read_new (int id, void **resultarray, int npaths, double worker_runtime) {
 
96
Result_single_read_new (int id, void **resultarray, int npaths, int second_absmq, double worker_runtime) {
93
97
  T new = (T) MALLOC_OUT(sizeof(*new));
94
98
 
95
99
  if (npaths == 0) {
112
116
  new->id = id;
113
117
  new->array = resultarray;
114
118
  new->npaths = npaths;
 
119
  new->second_absmq = second_absmq;
115
120
  new->worker_runtime = worker_runtime;
116
121
 
117
122
  return new;
118
123
}
119
124
 
120
125
T
121
 
Result_paired_read_new (int id, void **resultarray, int npaths, Pairtype_T final_pairtype, double worker_runtime) {
 
126
Result_paired_read_new (int id, void **resultarray, int npaths, int second_absmq, Pairtype_T final_pairtype, double worker_runtime) {
122
127
  T new = (T) MALLOC_OUT(sizeof(*new));
123
128
 
124
129
  if (npaths == 0) {
150
155
  new->id = id;
151
156
  new->array = resultarray;
152
157
  new->npaths = npaths;
 
158
  new->second_absmq = second_absmq;
153
159
  new->worker_runtime = worker_runtime;
154
160
 
155
161
  return new;
156
162
}
157
163
 
158
164
T
159
 
Result_paired_as_singles_new (int id, void **hits5, int npaths5, void **hits3, int npaths3, double worker_runtime) {
 
165
Result_paired_as_singles_new (int id, void **hits5, int npaths5, int second_absmq5,
 
166
                              void **hits3, int npaths3, int second_absmq3, double worker_runtime) {
160
167
  T new = (T) MALLOC_OUT(sizeof(*new));
161
168
 
162
169
  debug(printf("npaths5 = %d, npaths3 = %d\n",npaths5,npaths3));
190
197
  new->id = id;
191
198
  new->array = hits5;
192
199
  new->npaths = npaths5;
 
200
  new->second_absmq = second_absmq5;
193
201
  new->array2 = hits3;
194
202
  new->npaths2 = npaths3;
 
203
  new->second_absmq2 = second_absmq3;
195
204
  new->worker_runtime = worker_runtime;
196
205
 
197
206
  return new;