Changeset 17677 for trunk/Mars
- Timestamp:
- 04/18/14 22:00:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/zofits.h
r17667 r17677 81 81 /// static setter for the default number of threads to use. -1 means all available physical cores 82 82 static uint32_t DefaultNumThreads(const uint32_t &_n=-2) { static uint32_t n=0; if (int32_t(_n)<-1) n=_n; return n; } 83 static uint 64_t DefaultMaxMemory(const uint64_t &_n=0) { static uint64_t n=1000000; if (_n>0) n=_n; return n; }83 static uint32_t DefaultMaxMemory(const uint32_t &_n=0) { static uint32_t n=1000000; if (_n>0) n=_n; return n; } 84 84 static uint32_t DefaultMaxNumTiles(const uint32_t &_n=0) { static uint32_t n=1000; if (_n>0) n=_n; return n; } 85 85 static uint32_t DefaultNumRowsPerTile(const uint32_t &_n=0) { static uint32_t n=100; if (_n>0) n=_n; return n; } … … 91 91 zofits(uint32_t numTiles = DefaultMaxNumTiles(), 92 92 uint32_t rowPerTile = DefaultNumRowsPerTile(), 93 uint 64_t maxUsableMem= DefaultMaxMemory()) : ofits(),94 fMemPool(0, maxUsableMem*1000),93 uint32_t maxUsableMem= DefaultMaxMemory()) : ofits(), 94 fMemPool(0, size_t(maxUsableMem)*1000), 95 95 fWriteToDiskQueue(std::bind(&zofits::WriteBufferToDisk, this, std::placeholders::_1), false) 96 96 { … … 106 106 uint32_t numTiles = DefaultMaxNumTiles(), 107 107 uint32_t rowPerTile = DefaultNumRowsPerTile(), 108 uint 64_t maxUsableMem= DefaultMaxMemory()) : ofits(fname),108 uint32_t maxUsableMem= DefaultMaxMemory()) : ofits(fname), 109 109 fMemPool(0, maxUsableMem*1000), 110 110 fWriteToDiskQueue(std::bind(&zofits::WriteBufferToDisk, this, std::placeholders::_1), false) … … 155 155 //start the compression queues 156 156 for (auto it=fCompressionQueues.begin(); it!= fCompressionQueues.end(); it++) 157 {158 157 it->start(); 159 } 158 160 159 //start the disk writer 161 160 fWriteToDiskQueue.start(); … … 536 535 537 536 /// Overload of the ofits method. Just calls the zofits specific one with default, uncompressed options for this column 538 bool AddColumn(uint32_t cnt, 539 char typechar, 540 const std::string& name, 541 const std::string& unit, 542 const std::string& comment="", 543 bool addHeaderKeys=true) 537 bool AddColumn(uint32_t cnt, char typechar, const std::string& name, const std::string& unit, 538 const std::string& comment="", bool addHeaderKeys=true) 544 539 { 545 540 return AddColumn(FITS::kFactRaw, cnt, typechar, name, unit, comment, addHeaderKeys);
Note:
See TracChangeset
for help on using the changeset viewer.