singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject [1/8] incubator-singa git commit: SINGA-53 Add lmdb compiling options
Date Thu, 13 Aug 2015 06:37:42 GMT
Repository: incubator-singa
Updated Branches:
  refs/heads/master da844afd1 -> 9d43056af


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/975f0cf6/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index ddae503..277eb96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,18 @@ AC_CHECK_LIB([glog], [main], [], [
 AC_CHECK_LIB([protobuf], [main], [], [
   AC_MSG_ERROR([unable to find protobuf library])
   ])
+
+AC_ARG_ENABLE(lmdb,
+     AS_HELP_STRING([--enable-lmdb],[enable debug option]),
+	 [enable_lmdb=yes],[enable_lmdb=no])
+AM_CONDITIONAL(LMDB, test "$enable_lmdb" = yes)
+if test x"$enable_lmdb" = x"yes"; then
+	AC_SEARCH_LIBS([mdb_env_create], [lmdb], [], [
+	  AC_MSG_ERROR([unable to find mdb_env_create() function])
+	  ])
+	AC_DEFINE(LMDB, 1, [Enable Option layer])
+fi
+
 AC_CHECK_LIB([opencv_imgproc], [main], [], [
   AC_MSG_ERROR([unable to find opencv_imgproc lib])
   ])
@@ -44,9 +56,6 @@ AC_CHECK_LIB([opencv_highgui], [main], [], [
 AC_CHECK_LIB([opencv_core], [main], [], [
   AC_MSG_ERROR([unable to find opencv_core lib])
   ])
-AC_SEARCH_LIBS([mdb_env_create], [lmdb], [], [
-  AC_MSG_ERROR([unable to find mdb_env_create() function])
-  ])
 AC_CHECK_LIB([zookeeper_mt], [main], [], [
   AC_MSG_ERROR([unable to find zookeeper])
   ])

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/975f0cf6/include/neuralnet/optional_layer.h
----------------------------------------------------------------------
diff --git a/include/neuralnet/optional_layer.h b/include/neuralnet/optional_layer.h
index f6b60d3..a6db9b8 100644
--- a/include/neuralnet/optional_layer.h
+++ b/include/neuralnet/optional_layer.h
@@ -1,4 +1,5 @@
-#ifdef USE_OPTIONAL_LAYER
+//#ifdef USE_OPTIONAL_LAYER
+#ifdef USE_LMDB
 #ifndef SINGA_NEURALNET_OPTIONAL_LAYER_
 #define SINGA_NEURALNET_OPTIONAL_LAYER_
 #include "neuralnet/layer.h"

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/975f0cf6/src/neuralnet/optional_layer.cc
----------------------------------------------------------------------
diff --git a/src/neuralnet/optional_layer.cc b/src/neuralnet/optional_layer.cc
index 06f413f..8cc7f5e 100644
--- a/src/neuralnet/optional_layer.cc
+++ b/src/neuralnet/optional_layer.cc
@@ -1,4 +1,5 @@
-#ifdef USE_OPTIONAL_LAYER
+//#ifdef USE_OPTIONAL_LAYER
+#ifdef USE_LMDB
 #include "neuralnet/optional_layer.h"
 namespace singa {
 


Mime
View raw message