Reduce last-split memory & time usage a bit
authorMartin C. Frith
Mon Mar 16 12:29:28 2020 +0900 (2 months ago)
changeset 1060ca3f417edc01
parent 1059 a380494ff77b
child 1061 543d36d39ce3
Reduce last-split memory & time usage a bit
src/split/cbrc_split_aligner.cc
src/split/cbrc_split_aligner.hh
     1.1 --- a/src/split/cbrc_split_aligner.cc	Mon Mar 16 11:42:45 2020 +0900
     1.2 +++ b/src/split/cbrc_split_aligner.cc	Mon Mar 16 12:29:28 2020 +0900
     1.3 @@ -1063,7 +1063,7 @@
     1.4  
     1.5  size_t SplitAligner::memory(bool isViterbi, bool isBothSpliceStrands) const {
     1.6    size_t numOfStrands = isBothSpliceStrands ? 2 : 1;
     1.7 -  size_t x = 2 * sizeof(int) + 2 * sizeof(double);
     1.8 +  size_t x = 2 * sizeof(int) + 2 * sizeof(float);
     1.9    if (splicePrior > 0 || !chromosomeIndex.empty()) x += 2 * sizeof(unsigned);
    1.10    if (!chromosomeIndex.empty()) x += 2;
    1.11    if (isViterbi) x += sizeof(long) * numOfStrands;
     2.1 --- a/src/split/cbrc_split_aligner.hh	Mon Mar 16 11:42:45 2020 +0900
     2.2 +++ b/src/split/cbrc_split_aligner.hh	Mon Mar 16 12:29:28 2020 +0900
     2.3 @@ -164,7 +164,7 @@
     2.4      std::vector<long> Vmat;  // DP matrix for Viterbi algorithm
     2.5      std::vector<long> Vvec;  // DP vector for Viterbi algorithm
     2.6  
     2.7 -    std::vector<double> Sexp;
     2.8 +    std::vector<float> Sexp;
     2.9      // Sexp holds exp(Smat / t): these values are called A'ij and D'ij
    2.10      // in [Frith&Kawaguchi 2015].
    2.11