summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-25 21:05:06 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-25 21:05:06 +0000
commit17623986ba1c9c9a3f91da4f215f25b9d9c0ea96 (patch)
tree4daf407374f8f27ea1b5973293f5f48be0fd9114
parent41fa62485ce194e176ef0a7ff1fc8ebc42d5ffe7 (diff)
USE_INFO_EDGE 0 include
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@412 ec762483-ff6d-05da-a07a-a48fb63a330f
-rwxr-xr-xdecoder/ff_fsa.h6
-rw-r--r--decoder/hg.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/decoder/ff_fsa.h b/decoder/ff_fsa.h
index 93e3bd5e..1be773b9 100755
--- a/decoder/ff_fsa.h
+++ b/decoder/ff_fsa.h
@@ -14,7 +14,13 @@
//TODO: decide whether to use init_features / add_value vs. summing elsewhere + set_value once (or inefficient for from_fsa: sum distinct feature_vectors. but L->R if we only scan 1 word at a time, that's fine
//#define FSA_DEBUG
+
+#ifdef USE_INFO_EDGE
#define FSA_DEBUG_CERR 0
+#else
+#define FSA_DEBUG_CERR 1
+#endif
+
#define FSA_DEBUG_DEBUG 0
# define FSADBGif(i,e,x) do { if (i) { if (FSA_DEBUG_CERR){std::cerr<<x;} INFO_EDGE(e,x); if (FSA_DEBUG_DEBUG){std::cerr<<"FSADBGif edge.info "<<&e<<" = "<<e.info()<<std::endl;}} } while(0)
# define FSADBGif_nl(i,e) do { if (i) { if (FSA_DEBUG_CERR) std::cerr<<std::endl; INFO_EDGE(e,"; "); } } while(0)
diff --git a/decoder/hg.h b/decoder/hg.h
index c4159999..6dd10584 100644
--- a/decoder/hg.h
+++ b/decoder/hg.h
@@ -7,7 +7,6 @@
// define USE_INFO_EDGE 1 if you want lots of debug info shown with --show_derivations - otherwise it adds quite a bit of overhead if ffs have their logging enabled (e.g. ff_from_fsa)
#define USE_INFO_EDGE 0
#if USE_INFO_EDGE
-# include <sstream>
# define INFO_EDGE(e,msg) do { std::ostringstream &o=(e.info_);o<<msg; } while(0)
# define INFO_EDGEw(e,msg) do { std::ostringstream &o(e.info_);if (o.empty()) o<<' ';o<<msg; } while(0)
#else
@@ -16,6 +15,7 @@
#endif
#define INFO_EDGEln(e,msg) INFO_EDGE(e,msg<<'\n')
+#include <sstream>
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>