[med-svn] [cnrun] 05/14: big reshuffle in libcnrun

andrei zavada hmmr-guest at moszumanska.debian.org
Sat Feb 21 15:07:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to branch WIP
in repository cnrun.

commit 3e2d0528999aacc72cc971def5ff8d7a0a6994cc
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Tue Dec 2 02:47:01 2014 +0200

    big reshuffle in libcnrun
---
 upstream/configure.ac                              |  2 +-
 upstream/src/libcnrun/Makefile.am                  | 87 ++++++++++++++--------
 .../{integrate-base.hh => integrator/base.hh}      |  8 +-
 .../{integrate-rk65.hh => integrator/rk65.hh}      |  9 +--
 upstream/src/libcnrun/model/.dirstamp              |  0
 .../libcnrun/{model-cycle.cc => model/cycle.cc}    |  4 +-
 upstream/src/libcnrun/model/forward-decls.hh       | 28 +++++++
 upstream/src/libcnrun/{ => model}/model.hh         | 20 ++---
 .../libcnrun/{model-nmlio.cc => model/nmlio.cc}    |  2 +-
 upstream/src/libcnrun/{ => model}/sources.cc       |  2 +-
 upstream/src/libcnrun/{ => model}/sources.hh       |  8 +-
 .../libcnrun/{model-struct.cc => model/struct.cc}  |  2 +-
 .../src/libcnrun/{model-tags.cc => model/tags.cc}  |  0
 upstream/src/libcnrun/units/.dirstamp              |  0
 upstream/src/libcnrun/{ => units}/base-neuron.hh   |  6 +-
 upstream/src/libcnrun/{ => units}/base-synapse.hh  |  6 +-
 upstream/src/libcnrun/{ => units}/base-unit.cc     |  4 +-
 upstream/src/libcnrun/{ => units}/base-unit.hh     |  9 ++-
 upstream/src/libcnrun/{ => units}/forward-decls.hh |  8 +-
 upstream/src/libcnrun/{ => units}/hosted-attr.hh   |  6 +-
 .../src/libcnrun/{ => units}/hosted-neurons.cc     |  4 +-
 .../src/libcnrun/{ => units}/hosted-neurons.hh     |  6 +-
 .../src/libcnrun/{ => units}/hosted-synapses.cc    |  4 +-
 .../src/libcnrun/{ => units}/hosted-synapses.hh    |  6 +-
 upstream/src/libcnrun/{ => units}/mx-attr.hh       |  6 +-
 .../src/libcnrun/{ => units}/standalone-attr.hh    |  6 +-
 .../src/libcnrun/{ => units}/standalone-neurons.cc |  4 +-
 .../src/libcnrun/{ => units}/standalone-neurons.hh |  6 +-
 .../libcnrun/{ => units}/standalone-synapses.cc    |  4 +-
 .../libcnrun/{ => units}/standalone-synapses.hh    |  6 +-
 upstream/src/libcnrun/{ => units}/types.cc         |  2 +-
 upstream/src/libcnrun/{ => units}/types.hh         |  6 +-
 upstream/src/lua-cnrun/Makefile.am                 |  2 +-
 upstream/src/lua-cnrun/cnhost.hh                   |  8 +-
 upstream/src/lua-cnrun/commands.cc                 | 23 +++++-
 upstream/src/tools/Makefile.am                     |  2 +-
 36 files changed, 189 insertions(+), 117 deletions(-)

diff --git a/upstream/configure.ac b/upstream/configure.ac
index 77b9ecf..c4aa450 100644
--- a/upstream/configure.ac
+++ b/upstream/configure.ac
@@ -1,7 +1,7 @@
 AC_COPYRIGHT([Copyright (c) 2008-14 Andrei Zavada <johnhommer at gmail.com>])
 
 AC_INIT([cnrun], [2.1.0_rc], [johnhommer at gmail.com])
-AC_CONFIG_SRCDIR([src/libcnrun/model.hh])
+AC_CONFIG_SRCDIR([src/libcnrun/model/model.hh])
 AC_CONFIG_MACRO_DIR([m4])
 AC_PREREQ(2.61)
 
diff --git a/upstream/src/libcnrun/Makefile.am b/upstream/src/libcnrun/Makefile.am
index 2e25618..4d06420 100644
--- a/upstream/src/libcnrun/Makefile.am
+++ b/upstream/src/libcnrun/Makefile.am
@@ -1,30 +1,38 @@
 include $(top_srcdir)/src/Common.mk
-AM_CXXFLAGS += -shared -fPIC
+AM_CXXFLAGS += -I. -shared -fPIC
 
 lib_LTLIBRARIES = \
 	libcnrun.la
 
 libcnrun_la_SOURCES = \
-	forward-decls.hh \
-	sources.cc \
-	types.cc \
-	base-unit.cc \
-	standalone-neurons.cc \
-	standalone-synapses.cc \
-	hosted-neurons.cc \
-	hosted-synapses.cc \
-	model-struct.cc \
-	model-tags.cc \
-	model-cycle.cc \
-	model-nmlio.cc \
+	integrator/base.hh \
+	integrator/rk65.hh \
+	model/cycle.cc \
+	model/forward-decls.hh \
+	model/model.hh \
+	model/nmlio.cc \
+	model/sources.cc \
+	model/struct.cc \
+	model/tags.cc \
 	sources.hh \
-	types.hh \
-	mx-attr.hh \
-	base-unit.hh	standalone-attr.hh    	hosted-attr.hh \
-	base-synapse.hh	standalone-neurons.hh 	hosted-neurons.hh  \
-	base-neuron.hh	standalone-synapses.hh	hosted-synapses.hh \
-	model.hh \
-	integrate-base.hh integrate-rk65.hh
+	units/base-neuron.hh \
+	units/base-synapse.hh \
+	units/base-unit.cc \
+	units/base-unit.hh \
+	units/forward-decls.hh \
+	units/hosted-attr.hh \
+	units/hosted-neurons.cc \
+	units/hosted-neurons.hh  \
+	units/hosted-synapses.cc \
+	units/hosted-synapses.hh \
+	units/mx-attr.hh \
+	units/standalone-attr.hh \
+	units/standalone-neurons.cc \
+	units/standalone-neurons.hh \
+	units/standalone-synapses.cc \
+	units/standalone-synapses.hh \
+	units/types.cc \
+	units/types.hh
 
 libcnrun_la_LIBADD = \
 	../libstilton/liba.a \
@@ -33,15 +41,32 @@ libcnrun_la_LIBADD = \
 libcnrun_la_LDFLAGS = \
 	-shared -version-info 2:0:0
 
-libcnrunincdir = $(includedir)/libcnrun
+libcnrun_units_incdir = $(includedir)/libcnrun/units
+
+libcnrun_units_inc_HEADERS = \
+	units/forward-decls.hh \
+	units/base-neuron.hh \
+	units/base-synapse.hh \
+	units/base-unit.hh \
+	units/hosted-attr.hh \
+	units/hosted-neurons.hh  \
+	units/hosted-synapses.hh \
+	units/mx-attr.hh \
+	units/standalone-attr.hh \
+	units/standalone-neurons.hh \
+	units/standalone-synapses.hh \
+	units/types.hh
+
+libcnrun_model_incdir = $(includedir)/libcnrun/model
+
+libcnrun_model_inc_HEADERS = \
+	model/forward-decls.hh \
+	model/sources.hh \
+	model/model.hh
+
+libcnrun_integrator_incdir = $(includedir)/libcnrun/integrator
+
+libcnrun_integrator_inc_HEADERS = \
+	integrator/base.hh \
+	integrator/rk65.hh
 
-libcnruninc_HEADERS = \
-	forward-decls.hh \
-	sources.hh \
-	types.hh \
-	mx-attr.hh \
-	base-unit.hh	standalone-attr.hh    	hosted-attr.hh \
-	base-synapse.hh	standalone-neurons.hh 	hosted-neurons.hh  \
-	base-neuron.hh	standalone-synapses.hh	hosted-synapses.hh \
-	model.hh \
-	integrate-base.hh integrate-rk65.hh
diff --git a/upstream/src/libcnrun/integrate-base.hh b/upstream/src/libcnrun/integrator/base.hh
similarity index 89%
rename from upstream/src/libcnrun/integrate-base.hh
rename to upstream/src/libcnrun/integrator/base.hh
index e4d6399..1fe3696 100644
--- a/upstream/src/libcnrun/integrate-base.hh
+++ b/upstream/src/libcnrun/integrator/base.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/integrate-base.hh
+ *       File name:  libcnrun/integrator/base.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny
@@ -10,15 +10,15 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_INTEGRATE_BASE_H_
-#define CNRUN_LIBCN_INTEGRATE_BASE_H_
+#ifndef CNRUN_LIBCNRUN_INTEGRATOR_BASE_H_
+#define CNRUN_LIBCNRUN_INTEGRATOR_BASE_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
 #endif
 
 #include "libstilton/lang.hh"
-#include "forward-decls.hh"
+#include "model/forward-decls.hh"
 
 
 namespace cnrun {
diff --git a/upstream/src/libcnrun/integrate-rk65.hh b/upstream/src/libcnrun/integrator/rk65.hh
similarity index 87%
rename from upstream/src/libcnrun/integrate-rk65.hh
rename to upstream/src/libcnrun/integrator/rk65.hh
index ae1d033..c1d2310 100644
--- a/upstream/src/libcnrun/integrate-rk65.hh
+++ b/upstream/src/libcnrun/integrator/rk65.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/integrate-rk65.hh
+ *       File name:  libcnrun/integrator/rk65.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_INTEGRATERK65_H_
-#define CNRUN_LIBCN_INTEGRATERK65_H_
+#ifndef CNRUN_LIBCNRUN_INTEGRATOR_RK65_H_
+#define CNRUN_LIBCNRUN_INTEGRATOR_RK65_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
@@ -19,8 +19,7 @@
 
 #include <vector>
 #include "libstilton/lang.hh"
-#include "forward-decls.hh"
-#include "integrate-base.hh"
+#include "base.hh"
 
 using namespace std;
 
diff --git a/upstream/src/libcnrun/model/.dirstamp b/upstream/src/libcnrun/model/.dirstamp
new file mode 100644
index 0000000..e69de29
diff --git a/upstream/src/libcnrun/model-cycle.cc b/upstream/src/libcnrun/model/cycle.cc
similarity index 99%
rename from upstream/src/libcnrun/model-cycle.cc
rename to upstream/src/libcnrun/model/cycle.cc
index 5610f48..5247bae 100644
--- a/upstream/src/libcnrun/model-cycle.cc
+++ b/upstream/src/libcnrun/model/cycle.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  cnrun/model-cycle.cc
+ *       File name:  libcnrun/model/cycle.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  * Initial version:  2008-08-02
@@ -18,7 +18,7 @@
 #include <iostream>
 
 #include "libstilton/lang.hh"
-#include "integrate-rk65.hh"
+#include "integrator/rk65.hh"
 #include "model.hh"
 
 
diff --git a/upstream/src/libcnrun/model/forward-decls.hh b/upstream/src/libcnrun/model/forward-decls.hh
new file mode 100644
index 0000000..10664e0
--- /dev/null
+++ b/upstream/src/libcnrun/model/forward-decls.hh
@@ -0,0 +1,28 @@
+/*
+ *       File name:  libcnrun/model/forward-decls.hh
+ *         Project:  cnrun
+ *          Author:  Andrei Zavada <johnhommer at gmail.com>
+ * Initial version:  2014-09-16
+ *
+ *         Purpose:  forward declarations
+ *
+ *         License:  GPL-2+
+ */
+
+#ifndef CNRUN_LIBCNRUN_MODEL_FORWARDDECLS_H_
+#define CNRUN_LIBCNRUN_MODEL_FORWARDDECLS_H_
+
+namespace cnrun {
+
+class CModel;
+
+}
+
+#endif
+
+// Local Variables:
+// Mode: c++
+// indent-tabs-mode: nil
+// tab-width: 8
+// c-basic-offset: 8
+// End:
diff --git a/upstream/src/libcnrun/model.hh b/upstream/src/libcnrun/model/model.hh
similarity index 98%
rename from upstream/src/libcnrun/model.hh
rename to upstream/src/libcnrun/model/model.hh
index a0468ea..093a025 100644
--- a/upstream/src/libcnrun/model.hh
+++ b/upstream/src/libcnrun/model/model.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/model.hh
+ *       File name:  libcnrun/model/model.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  * Initial version:  2008-09-02
@@ -20,8 +20,8 @@ parameters.
 --------------------------------------------------------------------------*/
 
 
-#ifndef CNRUN_LIBCN_MODEL_H_
-#define CNRUN_LIBCN_MODEL_H_
+#ifndef CNRUN_LIBCNRUN_MODEL_MODEL_H_
+#define CNRUN_LIBCNRUN_MODEL_MODEL_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
@@ -38,13 +38,13 @@ parameters.
 
 #include "libstilton/misc.hh"
 #include "forward-decls.hh"
-#include "base-neuron.hh"
-#include "base-synapse.hh"
-#include "hosted-neurons.hh"
-#include "hosted-synapses.hh"
-#include "standalone-neurons.hh"
-#include "standalone-synapses.hh"
-#include "integrate-rk65.hh"
+#include "units/base-neuron.hh"
+#include "units/base-synapse.hh"
+#include "units/hosted-neurons.hh"
+#include "units/hosted-synapses.hh"
+#include "units/standalone-neurons.hh"
+#include "units/standalone-synapses.hh"
+#include "integrator/rk65.hh"
 
 
 using namespace std;
diff --git a/upstream/src/libcnrun/model-nmlio.cc b/upstream/src/libcnrun/model/nmlio.cc
similarity index 99%
rename from upstream/src/libcnrun/model-nmlio.cc
rename to upstream/src/libcnrun/model/nmlio.cc
index 2286c7b..f4d8360 100644
--- a/upstream/src/libcnrun/model-nmlio.cc
+++ b/upstream/src/libcnrun/model/nmlio.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/model-nmlio.cc
+ *       File name:  libcnrun/model/nmlio.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  * Initial version:  2008-09-02
diff --git a/upstream/src/libcnrun/sources.cc b/upstream/src/libcnrun/model/sources.cc
similarity index 99%
rename from upstream/src/libcnrun/sources.cc
rename to upstream/src/libcnrun/model/sources.cc
index 1dcd47d..8830ebc 100644
--- a/upstream/src/libcnrun/sources.cc
+++ b/upstream/src/libcnrun/model/sources.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/sources.cc
+ *       File name:  libcnrun/model/sources.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
diff --git a/upstream/src/libcnrun/sources.hh b/upstream/src/libcnrun/model/sources.hh
similarity index 96%
rename from upstream/src/libcnrun/sources.hh
rename to upstream/src/libcnrun/model/sources.hh
index a6e3c32..9d1b5d7 100644
--- a/upstream/src/libcnrun/sources.hh
+++ b/upstream/src/libcnrun/model/sources.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/sources.hh
+ *       File name:  libcnrun/model/sources.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_SOURCES_H_
-#define CNRUN_LIBCN_SOURCES_H_
+#ifndef CNRUN_LIBCNRUN_MODEL_SOURCES_H_
+#define CNRUN_LIBCNRUN_MODEL_SOURCES_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
@@ -23,7 +23,7 @@
 #include <gsl/gsl_rng.h>
 
 #include "libstilton/lang.hh"
-#include "forward-decls.hh"
+#include "units/forward-decls.hh"
 
 
 using namespace std;
diff --git a/upstream/src/libcnrun/model-struct.cc b/upstream/src/libcnrun/model/struct.cc
similarity index 99%
rename from upstream/src/libcnrun/model-struct.cc
rename to upstream/src/libcnrun/model/struct.cc
index e747583..f5d96f6 100644
--- a/upstream/src/libcnrun/model-struct.cc
+++ b/upstream/src/libcnrun/model/struct.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/mmodel-struct.cc
+ *       File name:  libcnrun/mmodel/struct.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny
diff --git a/upstream/src/libcnrun/model-tags.cc b/upstream/src/libcnrun/model/tags.cc
similarity index 100%
rename from upstream/src/libcnrun/model-tags.cc
rename to upstream/src/libcnrun/model/tags.cc
diff --git a/upstream/src/libcnrun/units/.dirstamp b/upstream/src/libcnrun/units/.dirstamp
new file mode 100644
index 0000000..e69de29
diff --git a/upstream/src/libcnrun/base-neuron.hh b/upstream/src/libcnrun/units/base-neuron.hh
similarity index 98%
rename from upstream/src/libcnrun/base-neuron.hh
rename to upstream/src/libcnrun/units/base-neuron.hh
index 603b692..ad3f35e 100644
--- a/upstream/src/libcnrun/base-neuron.hh
+++ b/upstream/src/libcnrun/units/base-neuron.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/base-neuron.hh
+ *       File name:  libcnrun/units/base-neuron.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_BASENEURON_H_
-#define CNRUN_LIBCN_BASENEURON_H_
+#ifndef CNRUN_LIBCN_UNITS_BASENEURON_H_
+#define CNRUN_LIBCN_UNITS_BASENEURON_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/base-synapse.hh b/upstream/src/libcnrun/units/base-synapse.hh
similarity index 94%
rename from upstream/src/libcnrun/base-synapse.hh
rename to upstream/src/libcnrun/units/base-synapse.hh
index 864148e..ebad567 100644
--- a/upstream/src/libcnrun/base-synapse.hh
+++ b/upstream/src/libcnrun/units/base-synapse.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/base-synapse.hh
+ *       File name:  libcnrun/units/base-synapse.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_BASESYNAPSE_H_
-#define CNRUN_LIBCN_BASESYNAPSE_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_BASESYNAPSE_H_
+#define CNRUN_LIBCNRUN_UNITS_BASESYNAPSE_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/base-unit.cc b/upstream/src/libcnrun/units/base-unit.cc
similarity index 99%
rename from upstream/src/libcnrun/base-unit.cc
rename to upstream/src/libcnrun/units/base-unit.cc
index 9984dfa..5d72777 100644
--- a/upstream/src/libcnrun/base-unit.cc
+++ b/upstream/src/libcnrun/units/base-unit.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/base-unit.cc
+ *       File name:  libcnrun/units/base-unit.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -24,7 +24,7 @@
 
 #include "libstilton/containers.hh"
 #include "base-unit.hh"
-#include "model.hh"
+#include "model/model.hh"
 
 
 using namespace std;
diff --git a/upstream/src/libcnrun/base-unit.hh b/upstream/src/libcnrun/units/base-unit.hh
similarity index 98%
rename from upstream/src/libcnrun/base-unit.hh
rename to upstream/src/libcnrun/units/base-unit.hh
index 21bfbd4..cb235fb 100644
--- a/upstream/src/libcnrun/base-unit.hh
+++ b/upstream/src/libcnrun/units/base-unit.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/base-unit.hh
+ *       File name:  libcnrun/units/base-unit.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_BASEUNIT_H_
-#define CNRUN_LIBCN_BASEUNIT_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_BASEUNIT_H_
+#define CNRUN_LIBCNRUN_UNITS_BASEUNIT_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
@@ -25,8 +25,9 @@
 #include "libstilton/lang.hh"
 #include "libstilton/string.hh"
 #include "forward-decls.hh"
+#include "model/forward-decls.hh"
 #include "types.hh"
-#include "sources.hh"
+#include "model/sources.hh"
 
 
 using namespace std;
diff --git a/upstream/src/libcnrun/forward-decls.hh b/upstream/src/libcnrun/units/forward-decls.hh
similarity index 80%
rename from upstream/src/libcnrun/forward-decls.hh
rename to upstream/src/libcnrun/units/forward-decls.hh
index 07ae859..b7da6a1 100644
--- a/upstream/src/libcnrun/forward-decls.hh
+++ b/upstream/src/libcnrun/units/forward-decls.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/forward-decls.hh
+ *       File name:  libcnrun/units/forward-decls.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  * Initial version:  2014-09-16
@@ -9,8 +9,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_FORWARDDECLS_H_
-#define CNRUN_LIBCN_FORWARDDECLS_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_FORWARDDECLS_H_
+#define CNRUN_LIBCNRUN_UNITS_FORWARDDECLS_H_
 
 namespace cnrun {
 
@@ -28,8 +28,6 @@ class C_HostedRateBasedNeuron;
 class CNeuronMap;
 class CSynapseMap;
 
-class CModel;
-
 }
 
 #endif
diff --git a/upstream/src/libcnrun/hosted-attr.hh b/upstream/src/libcnrun/units/hosted-attr.hh
similarity index 89%
rename from upstream/src/libcnrun/hosted-attr.hh
rename to upstream/src/libcnrun/units/hosted-attr.hh
index 84cc6f5..661acbf 100644
--- a/upstream/src/libcnrun/hosted-attr.hh
+++ b/upstream/src/libcnrun/units/hosted-attr.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/hosted-attr.hh
+ *       File name:  libcnrun/units/hosted-attr.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_HOSTEDATTR_H_
-#define CNRUN_LIBCN_HOSTEDATTR_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_HOSTEDATTR_H_
+#define CNRUN_LIBCNRUN_UNITS_HOSTEDATTR_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/hosted-neurons.cc b/upstream/src/libcnrun/units/hosted-neurons.cc
similarity index 99%
rename from upstream/src/libcnrun/hosted-neurons.cc
rename to upstream/src/libcnrun/units/hosted-neurons.cc
index acb7540..d9a6125 100644
--- a/upstream/src/libcnrun/hosted-neurons.cc
+++ b/upstream/src/libcnrun/units/hosted-neurons.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/hosted-neurons.cc
+ *       File name:  libcnrun/units/hosted-neurons.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -21,7 +21,7 @@
 #include "libstilton/lang.hh"
 
 #include "types.hh"
-#include "model.hh"
+#include "model/model.hh"
 
 
 cnrun::C_HostedNeuron::
diff --git a/upstream/src/libcnrun/hosted-neurons.hh b/upstream/src/libcnrun/units/hosted-neurons.hh
similarity index 98%
rename from upstream/src/libcnrun/hosted-neurons.hh
rename to upstream/src/libcnrun/units/hosted-neurons.hh
index d77e2b5..cf86043 100644
--- a/upstream/src/libcnrun/hosted-neurons.hh
+++ b/upstream/src/libcnrun/units/hosted-neurons.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/hosted-neurons.hh
+ *       File name:  libcnrun/units/hosted-neurons.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -11,8 +11,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_HOSTEDNEURONS_H_
-#define CNRUN_LIBCN_HOSTEDNEURONS_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_HOSTEDNEURONS_H_
+#define CNRUN_LIBCNRUN_UNITS_HOSTEDNEURONS_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/hosted-synapses.cc b/upstream/src/libcnrun/units/hosted-synapses.cc
similarity index 99%
rename from upstream/src/libcnrun/hosted-synapses.cc
rename to upstream/src/libcnrun/units/hosted-synapses.cc
index 8a57542..6b91d56 100644
--- a/upstream/src/libcnrun/hosted-synapses.cc
+++ b/upstream/src/libcnrun/units/hosted-synapses.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/hosted-synapses.cc
+ *       File name:  libcnrun/units/hosted-synapses.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -20,7 +20,7 @@
 #include "hosted-synapses.hh"
 
 #include "types.hh"
-#include "model.hh"
+#include "model/model.hh"
 
 using namespace std;
 
diff --git a/upstream/src/libcnrun/hosted-synapses.hh b/upstream/src/libcnrun/units/hosted-synapses.hh
similarity index 98%
rename from upstream/src/libcnrun/hosted-synapses.hh
rename to upstream/src/libcnrun/units/hosted-synapses.hh
index db2cc59..81bc499 100644
--- a/upstream/src/libcnrun/hosted-synapses.hh
+++ b/upstream/src/libcnrun/units/hosted-synapses.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/hosted-synapses.hh
+ *       File name:  libcnrun/units/hosted-synapses.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -11,8 +11,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_HOSTEDSYNAPSES_H_
-#define CNRUN_LIBCN_HOSTEDSYNAPSES_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_HOSTEDSYNAPSES_H_
+#define CNRUN_LIBCNRUN_UNITS_HOSTEDSYNAPSES_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/mx-attr.hh b/upstream/src/libcnrun/units/mx-attr.hh
similarity index 88%
rename from upstream/src/libcnrun/mx-attr.hh
rename to upstream/src/libcnrun/units/mx-attr.hh
index e38dd93..42b076b 100644
--- a/upstream/src/libcnrun/mx-attr.hh
+++ b/upstream/src/libcnrun/units/mx-attr.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/mx-attr.hh
+ *       File name:  libcnrun/units/mx-attr.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_MXATTR_H_
-#define CNRUN_LIBCN_MXATTR_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_MXATTR_H_
+#define CNRUN_LIBCNRUN_UNITS_MXATTR_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/standalone-attr.hh b/upstream/src/libcnrun/units/standalone-attr.hh
similarity index 86%
rename from upstream/src/libcnrun/standalone-attr.hh
rename to upstream/src/libcnrun/units/standalone-attr.hh
index 29ccb1d..05d380d 100644
--- a/upstream/src/libcnrun/standalone-attr.hh
+++ b/upstream/src/libcnrun/units/standalone-attr.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/standalone-attr.hh
+ *       File name:  libcnrun/units/standalone-attr.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -10,8 +10,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_STANDALONEATTR_H_
-#define CNRUN_LIBCN_STANDALONEATTR_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_STANDALONEATTR_H_
+#define CNRUN_LIBCNRUN_UNITS_STANDALONEATTR_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/standalone-neurons.cc b/upstream/src/libcnrun/units/standalone-neurons.cc
similarity index 99%
rename from upstream/src/libcnrun/standalone-neurons.cc
rename to upstream/src/libcnrun/units/standalone-neurons.cc
index ef9ac54..37f36fc 100644
--- a/upstream/src/libcnrun/standalone-neurons.cc
+++ b/upstream/src/libcnrun/units/standalone-neurons.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/standalone-neurons.cc
+ *       File name:  libcnrun/units/standalone-neurons.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -18,7 +18,7 @@
 #include <iostream>
 
 #include "types.hh"
-#include "model.hh"
+#include "model/model.hh"
 #include "standalone-neurons.hh"
 
 
diff --git a/upstream/src/libcnrun/standalone-neurons.hh b/upstream/src/libcnrun/units/standalone-neurons.hh
similarity index 97%
rename from upstream/src/libcnrun/standalone-neurons.hh
rename to upstream/src/libcnrun/units/standalone-neurons.hh
index e9168d5..7189059 100644
--- a/upstream/src/libcnrun/standalone-neurons.hh
+++ b/upstream/src/libcnrun/units/standalone-neurons.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/standalone-neurons.cc
+ *       File name:  libcnrun/units/standalone-neurons.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -11,8 +11,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_STANDALONENEURONS_H_
-#define CNRUN_LIBCN_STANDALONENEURONS_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_STANDALONENEURONS_H_
+#define CNRUN_LIBCNRUN_UNITS_STANDALONENEURONS_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/standalone-synapses.cc b/upstream/src/libcnrun/units/standalone-synapses.cc
similarity index 96%
rename from upstream/src/libcnrun/standalone-synapses.cc
rename to upstream/src/libcnrun/units/standalone-synapses.cc
index f4f1e54..77c0e10 100644
--- a/upstream/src/libcnrun/standalone-synapses.cc
+++ b/upstream/src/libcnrun/units/standalone-synapses.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/standalone-synapses.cc
+ *       File name:  libcnrun/units/standalone-synapses.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -17,7 +17,7 @@
 #include <iostream>
 
 #include "types.hh"
-#include "model.hh"
+#include "model/model.hh"
 #include "standalone-synapses.hh"
 
 
diff --git a/upstream/src/libcnrun/standalone-synapses.hh b/upstream/src/libcnrun/units/standalone-synapses.hh
similarity index 95%
rename from upstream/src/libcnrun/standalone-synapses.hh
rename to upstream/src/libcnrun/units/standalone-synapses.hh
index fa82c92..7f2de53 100644
--- a/upstream/src/libcnrun/standalone-synapses.hh
+++ b/upstream/src/libcnrun/units/standalone-synapses.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/standalone-synapses.hh
+ *       File name:  libcnrun/units/standalone-synapses.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -11,8 +11,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_LIBCN_STANDALONESYNAPSES_H_
-#define CNRUN_LIBCN_STANDALONESYNAPSES_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_STANDALONESYNAPSES_H_
+#define CNRUN_LIBCNRUN_UNITS_STANDALONESYNAPSES_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/libcnrun/types.cc b/upstream/src/libcnrun/units/types.cc
similarity index 99%
rename from upstream/src/libcnrun/types.cc
rename to upstream/src/libcnrun/units/types.cc
index d815542..7b1bdda 100644
--- a/upstream/src/libcnrun/types.cc
+++ b/upstream/src/libcnrun/units/types.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcn/types.cc
+ *       File name:  libcnrun/units/types.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
diff --git a/upstream/src/libcnrun/types.hh b/upstream/src/libcnrun/units/types.hh
similarity index 98%
rename from upstream/src/libcnrun/types.hh
rename to upstream/src/libcnrun/units/types.hh
index 084ce38..bd9ba18 100644
--- a/upstream/src/libcnrun/types.hh
+++ b/upstream/src/libcnrun/units/types.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  cnrun/types.hh
+ *       File name:  libcnrun/units/types.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -12,8 +12,8 @@
 
 //#define CN_WANT_MORE_NEURONS
 
-#ifndef CNRUN_LIBCN_TYPES_H_
-#define CNRUN_LIBCN_TYPES_H_
+#ifndef CNRUN_LIBCNRUN_UNITS_TYPES_H_
+#define CNRUN_LIBCNRUN_UNITS_TYPES_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
diff --git a/upstream/src/lua-cnrun/Makefile.am b/upstream/src/lua-cnrun/Makefile.am
index 8868611..2d8b0a7 100644
--- a/upstream/src/lua-cnrun/Makefile.am
+++ b/upstream/src/lua-cnrun/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/src/Common.mk
 
-AM_CXXFLAGS += $(LUA_INCLUDE)
+AM_CXXFLAGS += $(LUA_INCLUDE) -I$(top_srcdir)/src/libcnrun
 
 pkglib_LTLIBRARIES = \
 	libcnrun-lua.la
diff --git a/upstream/src/lua-cnrun/cnhost.hh b/upstream/src/lua-cnrun/cnhost.hh
index 7ac327b..84d9418 100644
--- a/upstream/src/lua-cnrun/cnhost.hh
+++ b/upstream/src/lua-cnrun/cnhost.hh
@@ -1,5 +1,5 @@
 /*
- *       File name:  cnrun/cnhost.hh
+ *       File name:  lua-cnrun/cnhost.hh
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  * Initial version:  2008-11-04
@@ -9,8 +9,8 @@
  *         License:  GPL-2+
  */
 
-#ifndef CNRUN_CNRUN_CNHOST_H_
-#define CNRUN_CNRUN_CNHOST_H_
+#ifndef CNRUN_LUACNRUN_CNHOST_H_
+#define CNRUN_LUACNRUN_CNHOST_H_
 
 #if HAVE_CONFIG_H && !defined(VERSION)
 #  include "config.h"
@@ -22,7 +22,7 @@ extern "C" {
 #include <lua.h>
 }
 
-#include "libcnrun/model.hh"
+#include "libcnrun/model/model.hh"
 
 namespace cnrun {
 
diff --git a/upstream/src/lua-cnrun/commands.cc b/upstream/src/lua-cnrun/commands.cc
index 91bae5c..3ffee50 100644
--- a/upstream/src/lua-cnrun/commands.cc
+++ b/upstream/src/lua-cnrun/commands.cc
@@ -1,5 +1,5 @@
 /*
- *       File name:  libcnlua/commands.cc
+ *       File name:  lua-cnrun/commands.cc
  *         Project:  cnrun
  *          Author:  Andrei Zavada <johnhommer at gmail.com>
  *                   building on original work by Thomas Nowotny <tnowotny at ucsd.edu>
@@ -961,6 +961,27 @@ int stop_log_spikes( lua_State *L)
 }
 
 
+
+
+/*
+int discover_peers( lua_State *L)
+{
+}
+
+int query_peer_state( lua_State *L)
+{
+}
+
+int query_peer_accepting_neurons( lua_State *L)
+{
+}
+
+int extend_peer_sources( lua_State *L)
+{
+}
+*/
+
+
 // all together now:
 const struct luaL_Reg cnlib [] = {
 #define BLOOP(X) {#X, X}
diff --git a/upstream/src/tools/Makefile.am b/upstream/src/tools/Makefile.am
index 6fbad79..ef7815e 100644
--- a/upstream/src/tools/Makefile.am
+++ b/upstream/src/tools/Makefile.am
@@ -1,7 +1,7 @@
 include $(top_srcdir)/src/Common.mk
 
 AM_CXXFLAGS += \
-	$(LIBCN_CFLAGS)
+	$(LIBCN_CFLAGS) -I$(top_srcdir)/src/libcnrun
 
 bin_PROGRAMS = \
 	spike2sdf hh-latency-estimator

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/cnrun.git



More information about the debian-med-commit mailing list