From d29aa371dc07b8118ec664a1ad26bb380559ab26 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 27 Dec 2010 22:52:25 -0600 Subject: Reorganize structure and defines so that things are more understandable Most things are always "compiled" now, but testing did show that gcc's dead code elimination successfully removes them from the executable. Testing did not show any performance impact. --- lcs.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lcs.c') diff --git a/lcs.c b/lcs.c index 2ea6f87..17d80e9 100644 --- a/lcs.c +++ b/lcs.c @@ -3,7 +3,7 @@ */ #include #include - +#include "arpa/inet.h" unsigned char tbuf[32] __attribute__((aligned(32))); #if 0 @@ -106,8 +106,7 @@ LCS(uint32, 32, 32) LCS(uint32, 32, 28) -#ifdef USE_LCS4 -int lcs_32_rough(unsigned char *str1, unsigned char *str2) { +int lcs_32_rough_4(unsigned char *str1, unsigned char *str2) { int max_length = 0; int max_length_next = 0; int offset; @@ -119,7 +118,6 @@ int lcs_32_rough(unsigned char *str1, unsigned char *str2) { } return max_length; } -#endif #endif @@ -157,9 +155,6 @@ int lcs_32_rough(unsigned char *str1, unsigned char *str2) { } #endif -#ifdef USE_PRE_LCS -#include "arpa/inet.h" - int lcs_upper_bound(const uint32_t * const str1_int, const uint32_t * const str2_int) { static char contains[256] = {0}; const unsigned char * const str1 = (const unsigned char * const)str1_int; @@ -217,7 +212,6 @@ int lcs_upper_bound(const uint32_t * const str1_int, const uint32_t * const str2 return ret; } -#endif /* Exact lcs implementation */ typedef unsigned char uchar; -- cgit v1.2.3-70-g09d2