Changeset 17228 for trunk/Mars
- Timestamp:
- 10/16/13 20:51:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/zofits.h
r17225 r17228 25 25 class zofits : public ofits 26 26 { 27 public: 27 template<class S> 28 struct QueueMin : std::list<S> 29 { 30 typename std::list<S>::iterator begin() 31 { 32 return min_element(std::list<S>::begin(), std::list<S>::end()); 33 } 34 }; 28 35 29 36 struct WriteTarget … … 33 40 return tile_num < other.tile_num; 34 41 } 42 35 43 uint32_t tile_num; 36 44 uint32_t size; … … 40 48 struct CompressionTarget 41 49 { 50 /* 42 51 bool operator < (const CompressionTarget& other) 43 52 { 44 53 return target < other.target; 45 } 54 }*/ 55 46 56 shared_ptr<MemoryChunk> src; 47 57 shared_ptr<MemoryChunk> transposed_src; … … 50 60 }; 51 61 52 62 public: 53 63 //constructors 54 64 zofits(uint32_t numTiles=1000, … … 56 66 uint64_t maxUsableMem=0) : ofits(), 57 67 fMemPool(0, maxUsableMem), 58 fWriteToDiskQueue(bind(&zofits::WriteBufferToDisk, this, placeholders::_1), true,false)68 fWriteToDiskQueue(bind(&zofits::WriteBufferToDisk, this, placeholders::_1), false) 59 69 { 60 70 InitMemberVariables(numTiles, rowPerTile, maxUsableMem); … … 67 77 uint64_t maxUsableMem=0) : ofits(fname), 68 78 fMemPool(0, maxUsableMem), 69 fWriteToDiskQueue(bind(&zofits::WriteBufferToDisk, this, placeholders::_1), true,false)79 fWriteToDiskQueue(bind(&zofits::WriteBufferToDisk, this, placeholders::_1), false) 70 80 { 71 81 InitMemberVariables(numTiles, rowPerTile, maxUsableMem); … … 578 588 579 589 //cannot be const, as resize does not want it that way 580 Queue<CompressionTarget> queue(bind(&zofits::CompressBuffer, this, placeholders::_1), false , false);590 Queue<CompressionTarget> queue(bind(&zofits::CompressBuffer, this, placeholders::_1), false); 581 591 582 592 //shrink … … 875 885 876 886 //thread related stuff 877 vector<Queue<CompressionTarget>> fCompressionQueues;878 Queue<WriteTarget >fWriteToDiskQueue;887 vector<Queue<CompressionTarget>> fCompressionQueues; 888 Queue<WriteTarget, QueueMin<WriteTarget>> fWriteToDiskQueue; 879 889 880 890 //thread related stuff
Note:
See TracChangeset
for help on using the changeset viewer.