summaryrefslogtreecommitdiff
blob: 171f9bab8faea896d600afd1a5855be8c009e2b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
Description: Renamed ChunkPool class to bowtieChunkPool.
 SeqAn has a class with the same name and fatal name collision happens.
Forwarded: no
Author: Ognyan Kulev <ogi@debian.org>
Last-Update: 2013-04-18

--- a/aligner.h
+++ b/aligner.h
@@ -337,7 +337,7 @@ public:
 		bool verbose,
 		bool quiet,
 		int maxBts,
-		ChunkPool *pool,
+		bowtieChunkPool *pool,
 		int *btCnt = NULL,
 		AlignerMetrics *metrics = NULL) :
 		Aligner(true, rangeMode),
@@ -544,7 +544,7 @@ protected:
 	bool quiet_; // don't print informational/warning info
 
 	const int maxBts_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	int *btCnt_;
 	AlignerMetrics *metrics_;
 };
@@ -585,7 +585,7 @@ public:
 		bool verbose,
 		bool quiet,
 		int maxBts,
-		ChunkPool *pool,
+		bowtieChunkPool *pool,
 		int *btCnt) :
 		Aligner(true, rangeMode),
 		refs_(refs),
@@ -1358,7 +1358,7 @@ protected:
 	bool quiet_;
 
 	int maxBts_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	int *btCnt_;
 
 	// Range-finding state for first mate
@@ -1482,7 +1482,7 @@ public:
 		bool verbose,
 		bool quiet,
 		int maxBts,
-		ChunkPool *pool,
+		bowtieChunkPool *pool,
 		int *btCnt) :
 		Aligner(true, rangeMode),
 		refs_(refs),
@@ -2035,7 +2035,7 @@ protected:
 	TDriver* driver_;
 
 	// Pool for distributing chunks of best-first path descriptor memory
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 
 	bool verbose_;
 	bool quiet_;
--- a/aligner_0mm.h
+++ b/aligner_0mm.h
@@ -32,7 +32,7 @@ public:
 			RangeCache* cacheFw,
 			RangeCache* cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool maqPenalty,
@@ -124,7 +124,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	bool maqPenalty_;
@@ -164,7 +164,7 @@ public:
 			RangeCache* cacheFw,
 			RangeCache* cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool reportSe,
@@ -366,7 +366,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	const bool reportSe_;
--- a/aligner_1mm.h
+++ b/aligner_1mm.h
@@ -32,7 +32,7 @@ public:
 			RangeCache *cacheFw,
 			RangeCache *cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool maqPenalty,
@@ -161,7 +161,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	const bool maqPenalty_;
@@ -201,7 +201,7 @@ public:
 			RangeCache *cacheFw,
 			RangeCache *cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool reportSe,
@@ -478,7 +478,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	const bool reportSe_;
--- a/aligner_23mm.h
+++ b/aligner_23mm.h
@@ -33,7 +33,7 @@ public:
 			RangeCache *cacheFw,
 			RangeCache *cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool maqPenalty,
@@ -231,7 +231,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	const bool maqPenalty_;
@@ -273,7 +273,7 @@ public:
 			RangeCache *cacheFw,
 			RangeCache *cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool reportSe,
@@ -675,7 +675,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	const bool reportSe_;
--- a/aligner_seed_mm.h
+++ b/aligner_seed_mm.h
@@ -37,7 +37,7 @@ public:
 			RangeCache* cacheFw,
 			RangeCache* cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool maqPenalty,
@@ -554,7 +554,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	bool strandFix_;
@@ -598,7 +598,7 @@ public:
 			RangeCache* cacheFw,
 			RangeCache* cacheBw,
 			uint32_t cacheLimit,
-			ChunkPool *pool,
+			bowtieChunkPool *pool,
 			BitPairReference* refs,
 			vector<String<Dna5> >& os,
 			bool reportSe,
@@ -1375,7 +1375,7 @@ private:
 	RangeCache *cacheFw_;
 	RangeCache *cacheBw_;
 	const uint32_t cacheLimit_;
-	ChunkPool *pool_;
+	bowtieChunkPool *pool_;
 	BitPairReference* refs_;
 	vector<String<Dna5> >& os_;
 	const bool reportSe_;
--- a/ebwt_search.cpp
+++ b/ebwt_search.cpp
@@ -111,7 +111,7 @@ static bool strandFix;  // attempt to fi
 static bool randomizeQuals; // randomize quality values
 static bool stats; // print performance stats
 static int chunkPoolMegabytes;    // max MB to dedicate to best-first search frames per thread
-static int chunkSz;    // size of single chunk disbursed by ChunkPool
+static int chunkSz;    // size of single chunk disbursed by bowtieChunkPool
 static bool chunkVerbose; // have chunk allocator output status messages?
 static bool recal;
 static int recalMaxCycle;
@@ -223,7 +223,7 @@ static void resetOptions() {
 	randomizeQuals			= false; // randomize quality values
 	stats					= false; // print performance stats
 	chunkPoolMegabytes		= 64;    // max MB to dedicate to best-first search frames per thread
-	chunkSz					= 256;   // size of single chunk disbursed by ChunkPool (in KB)
+	chunkSz					= 256;   // size of single chunk disbursed by bowtieChunkPool (in KB)
 	chunkVerbose			= false; // have chunk allocator output status messages?
 	recal					= false;
 	recalMaxCycle			= 64;
@@ -1201,7 +1201,7 @@ static void exactSearchWorkerStateful(vo
 	PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid);
 	HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink);
 
-	ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
+	bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
 	UnpairedExactAlignerV1Factory alSEfact(
 			ebwt,
 			NULL,
@@ -1385,7 +1385,7 @@ static void mismatchSearchWorkerFullStat
 	// Global initialization
 	PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid);
 	HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink);
-	ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
+	bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
 
 	Unpaired1mmAlignerV1Factory alSEfact(
 			ebwtFw,
@@ -1687,7 +1687,7 @@ static void twoOrThreeMismatchSearchWork
 	PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid);
 	HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink);
 
-	ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
+	bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
 	Unpaired23mmAlignerV1Factory alSEfact(
 			ebwtFw,
 			&ebwtBw,
@@ -2156,7 +2156,7 @@ static void seededQualSearchWorkerFullSt
 	// Global initialization
 	PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid);
 	HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink);
-	ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
+	bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose);
 
 	AlignerMetrics *metrics = NULL;
 	if(stats) {
--- a/ebwt_search_backtrack.h
+++ b/ebwt_search_backtrack.h
@@ -2724,7 +2724,7 @@ public:
 			bool verbose,
 			bool quiet,
 			bool mate1,
-			ChunkPool* pool,
+			bowtieChunkPool* pool,
 			int *btCnt) :
 			SingleRangeSourceDriver<EbwtRangeSource>(
 					params, rs, fw, sink, sinkPt, os, verbose,
@@ -2927,7 +2927,7 @@ public:
 			bool verbose,
 			bool quiet,
 			bool mate1,
-			ChunkPool* pool,
+			bowtieChunkPool* pool,
 			int *btCnt = NULL) :
 			params_(params),
 			rs_(rs),
@@ -2986,7 +2986,7 @@ protected:
 	bool verbose_;
 	bool quiet_;
 	bool mate1_;
-	ChunkPool* pool_;
+	bowtieChunkPool* pool_;
 	int *btCnt_;
 };
 
--- a/pool.h
+++ b/pool.h
@@ -19,13 +19,13 @@
  * is set at construction time.  Heap memory is only allocated at
  * construction and deallocated at destruction.
  */
-class ChunkPool {
+class bowtieChunkPool {
 public:
 	/**
 	 * Initialize a new pool with an initial size of about 'bytes'
 	 * bytes.  Exit with an error message if we can't allocate it.
 	 */
-	ChunkPool(uint32_t chunkSz, uint32_t totSz, bool verbose_) :
+	bowtieChunkPool(uint32_t chunkSz, uint32_t totSz, bool verbose_) :
 		verbose(verbose_), patid(0), pool_(NULL), cur_(0),
 		chunkSz_(chunkSz), totSz_(totSz), lim_(totSz/chunkSz),
 		bits_(lim_), exhaustCrash_(false),
@@ -38,7 +38,7 @@ public:
 			}
 		} catch(std::bad_alloc& e) {
 			ThreadSafe _ts(&gLock);
-			std::cerr << "Error: Could not allocate ChunkPool of "
+			std::cerr << "Error: Could not allocate bowtieChunkPool of "
 			          << totSz << " bytes" << std::endl;
 			exhausted();
 			throw 1; // Exit if we haven't already
@@ -48,7 +48,7 @@ public:
 	/**
 	 * Delete all the pools.
 	 */
-	~ChunkPool() {
+	~bowtieChunkPool() {
 		if(pool_ != NULL) delete[] pool_;
 	}
 
@@ -189,7 +189,7 @@ public:
 	 * Initialize a new pool with an initial size of about 'bytes'
 	 * bytes.  Exit with an error message if we can't allocate it.
 	 */
-	AllocOnlyPool(ChunkPool* pool, const char *name) :
+	AllocOnlyPool(bowtieChunkPool* pool, const char *name) :
 		pool_(pool), name_(name), curPool_(0), cur_(0)
 	{
 		assert(pool != NULL);
@@ -388,7 +388,7 @@ protected:
 		lastCurInPool_.pop_back();
 	}
 
-	ChunkPool*      pool_;
+	bowtieChunkPool*      pool_;
 	const char     *name_;
 	std::vector<T*> pools_; /// the memory pools
 	uint32_t        curPool_; /// pool we're current allocating from
--- a/range_source.h
+++ b/range_source.h
@@ -1388,7 +1388,7 @@ class PathManager {
 
 public:
 
-	PathManager(ChunkPool* cpool_, int *btCnt, bool verbose, bool quiet) :
+	PathManager(bowtieChunkPool* cpool_, int *btCnt, bool verbose, bool quiet) :
 		branchQ_(verbose, quiet),
 		cpool(cpool_),
 		bpool(cpool, "branch"),
@@ -1637,7 +1637,7 @@ protected:
 
 public:
 
-	ChunkPool *cpool; // pool for generic chunks of memory
+	bowtieChunkPool *cpool; // pool for generic chunks of memory
 	AllocOnlyPool<Branch> bpool; // pool for allocating Branches
 	AllocOnlyPool<RangeState> rpool; // pool for allocating RangeStates
 	AllocOnlyPool<Edit> epool; // pool for allocating Edits
@@ -1811,7 +1811,7 @@ public:
 		bool quiet,
 		bool mate1,
 		uint32_t minCostAdjustment,
-		ChunkPool* pool,
+		bowtieChunkPool* pool,
 		int *btCnt) :
 		RangeSourceDriver<TRangeSource>(true, minCostAdjustment),
 		len_(0), mate1_(mate1),