~ubuntu-branches/debian/wheezy/abyss/wheezy

« back to all changes in this revision

Viewing changes to ParseAligns/abyss-fixmate.cc

  • Committer: Package Import Robot
  • Author(s): Shaun Jackman
  • Date: 2012-05-31 11:39:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120531113913-39atrfritvjevhv6
Tags: 1.3.4-1
* New upstream release.
* debian/copyright: Add CityHash, which has an Expat license.
* debian/control: Bump Standards-Version to 3.9.3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "Histogram.h"
2
2
#include "IOUtil.h"
 
3
#include "MemoryUtil.h"
3
4
#include "SAM.h"
4
5
#include "StringUtil.h"
5
6
#include "Uncompress.h"
125
126
typedef unordered_map<string, SAMAlignment> Alignments;
126
127
#endif
127
128
 
128
 
/** Start of the data segment. */
129
 
static intptr_t sbrk0 = reinterpret_cast<intptr_t>(sbrk(0));
130
 
 
131
129
static void printProgress(const Alignments& map)
132
130
{
133
131
        if (opt::verbose == 0)
139
137
 
140
138
        size_t buckets = map.bucket_count();
141
139
        if (stats.alignments % 1000000 == 0 || buckets != prevBuckets) {
142
 
                ptrdiff_t bytes = reinterpret_cast<intptr_t>(sbrk(0)) - sbrk0;
143
140
                prevBuckets = buckets;
144
141
                size_t size = map.size();
145
142
                cerr << "Read " << stats.alignments << " alignments. "
146
143
                        << "Hash load: " << size << " / " << buckets
147
144
                        << " = " << (float)size / buckets
148
 
                        << " using " << toSI(bytes) << "B." << endl;
 
145
                        << " using " << toSI(getMemoryUsage()) << "B." << endl;
149
146
        }
150
147
}
151
148