Skip to content

Commit

Permalink
Help the vectorizer out.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-azarchs committed Sep 6, 2022
1 parent 14353c6 commit 0e34e5c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions star-sys/STAR/source/stitchAlignToTranscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
#include "binarySearch2.h"
// #include "stitchGapIndel.cpp"

namespace std {

// Specialize array<char, 4> comparison to help the vectorizer out.
//
// Comparing 2 arrays of width 4 should just end up being comparison of 32-bit
// values. The compiler has trouble figuring that out if it goes through the
// default implementation, which uses std::equal.
template<>
inline constexpr bool operator==(const array<char, 4>& a, const array<char, 4>& b) {
return a[0]==b[0] & a[1] == b[1] & a[2] == b[2] & a[3] == b[3];
}

}

intScore stitchAlignToTranscript(uint rAend, uint gAend, uint rBstart, uint gBstart, uint L, uint iFragB, uint sjAB, const Parameters& P, char* R, const Genome &mapGen, Transcript *trA, const uint outFilterMismatchNmaxTotal) {
//stitch together A and B, extend in the gap, returns max score
Expand Down

0 comments on commit 0e34e5c

Please sign in to comment.