Permalink
Browse files

Do not inline functions used externally

Compiling using CLANG gives the following errors:
Undefined symbols for architecture x86_64:
  "_bwt_occ", referenced from:
      _bwt_cal_sa in bwt.o
      _bwt_sa in bwt.o
  "_bwt_2occ", referenced from:
      _bwt_match_exact in bwt.o
      _bwt_match_exact_alt in bwt.o
      _bwt_cal_width in bwtaln.o
  "_bwt_2occ4", referenced from:
      _bwt_match_gap in bwtgap.o
      _bsw2_core in bwtsw2_core.o
  "_bwtl_2occ4", referenced from:
      _bsw2_core in bwtsw2_core.o
  • Loading branch information...
1 parent 09ee115 commit 84d34e1d0bcc9df2fe2474eb823a5947d9b23c10 @sjackman sjackman committed Jun 25, 2012
Showing with 6 additions and 6 deletions.
  1. +4 −4 bwt.c
  2. +2 −2 bwt_lite.c
View
8 bwt.c
@@ -95,7 +95,7 @@ static inline int __occ_aux(uint64_t y, int c)
return ((y + (y >> 4)) & 0xf0f0f0f0f0f0f0full) * 0x101010101010101ull >> 56;
}
-inline bwtint_t bwt_occ(const bwt_t *bwt, bwtint_t k, ubyte_t c)
+bwtint_t bwt_occ(const bwt_t *bwt, bwtint_t k, ubyte_t c)
{
bwtint_t n, l, j;
uint32_t *p;
@@ -121,7 +121,7 @@ inline bwtint_t bwt_occ(const bwt_t *bwt, bwtint_t k, ubyte_t c)
}
// an analogy to bwt_occ() but more efficient, requiring k <= l
-inline void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint_t *ok, bwtint_t *ol)
+void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint_t *ok, bwtint_t *ol)
{
bwtint_t _k, _l;
_k = (k >= bwt->primary)? k-1 : k;
@@ -158,7 +158,7 @@ inline void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint
((bwt)->cnt_table[(b)&0xff] + (bwt)->cnt_table[(b)>>8&0xff] \
+ (bwt)->cnt_table[(b)>>16&0xff] + (bwt)->cnt_table[(b)>>24])
-inline void bwt_occ4(const bwt_t *bwt, bwtint_t k, bwtint_t cnt[4])
+void bwt_occ4(const bwt_t *bwt, bwtint_t k, bwtint_t cnt[4])
{
bwtint_t l, j, x;
uint32_t *p;
@@ -178,7 +178,7 @@ inline void bwt_occ4(const bwt_t *bwt, bwtint_t k, bwtint_t cnt[4])
}
// an analogy to bwt_occ4() but more efficient, requiring k <= l
-inline void bwt_2occ4(const bwt_t *bwt, bwtint_t k, bwtint_t l, bwtint_t cntk[4], bwtint_t cntl[4])
+void bwt_2occ4(const bwt_t *bwt, bwtint_t k, bwtint_t l, bwtint_t cntk[4], bwtint_t cntl[4])
{
bwtint_t _k, _l;
_k = (k >= bwt->primary)? k-1 : k;
View
@@ -65,7 +65,7 @@ inline uint32_t bwtl_occ(const bwtl_t *bwt, uint32_t k, uint8_t c)
if (c == 0) n -= 15 - (k&15); // corrected for the masked bits
return n;
}
-inline void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4])
+void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4])
{
uint32_t x, b;
if (k == (uint32_t)(-1)) {
@@ -80,7 +80,7 @@ inline void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4])
x -= 15 - (k&15);
cnt[0] += x&0xff; cnt[1] += x>>8&0xff; cnt[2] += x>>16&0xff; cnt[3] += x>>24;
}
-inline void bwtl_2occ4(const bwtl_t *bwt, uint32_t k, uint32_t l, uint32_t cntk[4], uint32_t cntl[4])
+void bwtl_2occ4(const bwtl_t *bwt, uint32_t k, uint32_t l, uint32_t cntk[4], uint32_t cntl[4])
{
bwtl_occ4(bwt, k, cntk);
bwtl_occ4(bwt, l, cntl);

0 comments on commit 84d34e1

Please sign in to comment.